Skip to content

Commit 0bd7a5c

Browse files
committed
do not reset the roi manager and aset image in focus
1 parent 14c7174 commit 0bd7a5c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/main/java/ai/nets/samj/ij/ui/Consumer.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,11 @@ public boolean isValidPromptSelected() {
212212

213213
@Override
214214
public void setFocusedImage(Object image) {
215+
boolean changed = activeImage != (ImagePlus) image;
216+
if (!changed) {
217+
WindowManager.setCurrentWindow(activeWindow);
218+
return;
219+
}
215220
activeImage = (ImagePlus) image;
216221
this.activeCanvas = this.activeImage.getCanvas();
217222
this.activeWindow = this.activeImage.getWindow();
@@ -594,7 +599,7 @@ private RoiManager startRoiManager() {
594599
if (roiManager == null) {
595600
roiManager = new RoiManager();
596601
}
597-
roiManager.reset();
602+
// TODO what to do? roiManager.reset();
598603
roiManager.setVisible(true);
599604
roiManager.setTitle("SAM Roi Manager");
600605
Prefs.useNamesAsLabels = true;

0 commit comments

Comments
 (0)