From 049fcad38d818d1d111cba781a48814314d59644 Mon Sep 17 00:00:00 2001 From: Christian Tischer Date: Fri, 5 Jul 2024 08:56:49 +0200 Subject: [PATCH] Issue #1167 seems fine: it opens very fast. --- .../embl/mobie/lib/view/save/ViewSaver.java | 19 ++++--------------- src/test/java/debug/DebugIssue1167.java | 2 +- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/src/main/java/org/embl/mobie/lib/view/save/ViewSaver.java b/src/main/java/org/embl/mobie/lib/view/save/ViewSaver.java index 85de5a58..ecf42b60 100644 --- a/src/main/java/org/embl/mobie/lib/view/save/ViewSaver.java +++ b/src/main/java/org/embl/mobie/lib/view/save/ViewSaver.java @@ -57,23 +57,12 @@ public class ViewSaver { public static final String CREATE_NEW_VIEWS_JSON_FILE = "Make New Views JSON file"; - public static final String CREATE_SELECTION_GROUP = "Create new group"; + public static final String CREATE_SELECTION_GROUP = "Create New Group"; static { net.imagej.patcher.LegacyInjector.preinit(); } private MoBIE moBIE; - -// enum ProjectSaveLocation { -// datasetJson, -// viewsJson -// } - -// enum SaveMethod { -// saveAsNewView, -// overwriteExistingView -// } - public ViewSaver( MoBIE moBIE) { this.moBIE = moBIE; } @@ -90,11 +79,11 @@ public boolean saveViewDialog( View view ) if ( moBIE.getViews().containsKey( view.getName() ) ) { GenericDialog gd = new GenericDialog( "Overwrite view?" ); - gd.addMessage( "A view named \"" + view.getName() + "\" exists already.\nAre you sure you want to overwrite it?" ); + gd.addMessage( "A view named \"" + view.getName() + "\" exists already." + + "\nAre you sure you want to overwrite it?" ); gd.showDialog(); - if ( ! gd.wasOKed() ) { + if ( ! gd.wasOKed() ) return false; - } } view.setDescription( "" ); // TODO diff --git a/src/test/java/debug/DebugIssue1167.java b/src/test/java/debug/DebugIssue1167.java index e310cd76..1fdefcfe 100644 --- a/src/test/java/debug/DebugIssue1167.java +++ b/src/test/java/debug/DebugIssue1167.java @@ -12,7 +12,7 @@ public static void main( String[] args ) { new ImageJ().ui().showUI(); final OpenImageAndLabelsCommand command = new OpenImageAndLabelsCommand(); - command.image = new File( "/Users/tischer/Desktop/tim-oliver.ome.zarr" ); + command.image = new File( "/Users/tischer/Downloads/20240524_1_s2.zarr" ); command.run(); } }