From 8fd139a9f306be0fe6b8c691491101e85e5ae69c Mon Sep 17 00:00:00 2001 From: Martin Chase Date: Tue, 24 Sep 2024 10:40:48 -0700 Subject: [PATCH] do not attempt to merge when nothing is selected --- cellpose/gui/gui.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cellpose/gui/gui.py b/cellpose/gui/gui.py index 4d92732a..1f72131e 100644 --- a/cellpose/gui/gui.py +++ b/cellpose/gui/gui.py @@ -1445,6 +1445,8 @@ def done_remove_multiple_cells(self): self.remove_roi(self.remove_roi_obj) def merge_cells(self, idx): + if self.selected == 0: + return self.prev_selected = self.selected self.selected = idx if self.selected != self.prev_selected: