Skip to content

Commit

Permalink
do not reset the roi manager and aset image in focus
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosuc3m committed Dec 4, 2024
1 parent 14c7174 commit 0bd7a5c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/java/ai/nets/samj/ij/ui/Consumer.java
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,11 @@ public boolean isValidPromptSelected() {

@Override
public void setFocusedImage(Object image) {
boolean changed = activeImage != (ImagePlus) image;
if (!changed) {
WindowManager.setCurrentWindow(activeWindow);
return;
}
activeImage = (ImagePlus) image;
this.activeCanvas = this.activeImage.getCanvas();
this.activeWindow = this.activeImage.getWindow();
Expand Down Expand Up @@ -594,7 +599,7 @@ private RoiManager startRoiManager() {
if (roiManager == null) {
roiManager = new RoiManager();
}
roiManager.reset();
// TODO what to do? roiManager.reset();
roiManager.setVisible(true);
roiManager.setTitle("SAM Roi Manager");
Prefs.useNamesAsLabels = true;
Expand Down

0 comments on commit 0bd7a5c

Please sign in to comment.