From 8e04da6dcbb8115458c8f745d3c423a8d8bdae34 Mon Sep 17 00:00:00 2001 From: Tim Bernhard Date: Sat, 24 Feb 2024 09:54:25 +0100 Subject: [PATCH] Improve UX of batch update --- .../harvard/mcz/imagecapture/ui/dialog/BatchUpdateDialog.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/edu/harvard/mcz/imagecapture/ui/dialog/BatchUpdateDialog.java b/src/main/java/edu/harvard/mcz/imagecapture/ui/dialog/BatchUpdateDialog.java index 9c049fb..c8a3b49 100644 --- a/src/main/java/edu/harvard/mcz/imagecapture/ui/dialog/BatchUpdateDialog.java +++ b/src/main/java/edu/harvard/mcz/imagecapture/ui/dialog/BatchUpdateDialog.java @@ -139,8 +139,9 @@ private void doApplyChange() { // ask for confirmation int dialogButton = JOptionPane.YES_NO_OPTION; int dialogResult = JOptionPane.showConfirmDialog(this, nrOfChanges + " Specimen would be affected. Continue?", "Warning", dialogButton); - if (dialogResult == JOptionPane.NO_OPTION) { + if (!(dialogResult == JOptionPane.YES_OPTION)) { log.debug("Will not do batch update. Confirmation denied."); + session.getTransaction().rollback(); return; } } catch (Exception e) {