Skip to content

Commit bda72ba

Browse files
committed
- fix bug
修复track模式下,组id可能为all的bug
1 parent c9bc27e commit bda72ba

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

ISAT/widgets/annos_dock_widget.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,8 @@ def go_to_next_group(self):
191191
try:
192192
if self.comboBox_group_select.currentText() == "All":
193193
max_group = self.comboBox_group_select.itemText(len(self.comboBox_group_select) - 1)
194+
if max_group == 'All':
195+
max_group = 1
194196
self.mainwindow.current_group = max_group
195197
self.mainwindow.update_group_display()
196198
else:
@@ -211,6 +213,8 @@ def go_to_prev_group(self):
211213
try:
212214
if self.comboBox_group_select.currentText() == "All":
213215
max_group = self.comboBox_group_select.itemText(len(self.comboBox_group_select) - 1)
216+
if max_group == 'All':
217+
max_group = 1
214218
self.mainwindow.current_group = max_group
215219
self.mainwindow.update_group_display()
216220
else:

ISAT/widgets/mainwindow.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,14 +1045,13 @@ def show_image(self, index:int, zoomfit:bool=True):
10451045
self.current_group = group + 1 if group >= self.current_group else self.current_group
10461046
elif self.group_select_mode == 'manual':
10471047
self.current_group = 1
1048-
self.update_group_display()
10491048
except Exception as e:
10501049
pass
10511050
polygon = Polygon()
10521051
self.scene.addItem(polygon)
10531052
polygon.load_object(object)
10541053
self.polygons.append(polygon)
1055-
1054+
self.update_group_display()
10561055
if self.current_label is not None:
10571056
self.setWindowTitle('{}'.format(self.current_label.label_path))
10581057
else:

0 commit comments

Comments
 (0)