Skip to content

Commit daf11f1

Browse files
Update history_manager.py
Fixed key mismatch in batch undo logic by changing old_batch to old_data to match the history stack.
1 parent 22f9386 commit daf11f1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

annotation_tool/controllers/history_manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def _apply_state_change(self, cmd, is_undo):
128128

129129
# [NEW] Handle batch smart annotation run
130130
elif ctype == CmdType.BATCH_SMART_ANNOTATION_RUN:
131-
batch_data = cmd['old_batch'] if is_undo else cmd['new_batch']
131+
batch_data = cmd['old_data'] if is_undo else cmd['new_data']
132132

133133
for path, data in batch_data.items():
134134
if data:
@@ -430,4 +430,4 @@ def _apply_state_change(self, cmd, is_undo):
430430
if evt.get('head') == head and evt.get('label') == src:
431431
evt['label'] = dst
432432

433-
self._refresh_active_view()
433+
self._refresh_active_view()

0 commit comments

Comments
 (0)