Skip to content

Commit

Permalink
Fix incorrect handle_undo return value.
Browse files Browse the repository at this point in the history
  • Loading branch information
cmeyer committed Oct 16, 2024
1 parent 5f750bd commit ab27672
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nion/swift/DocumentController.py
Original file line number Diff line number Diff line change
Expand Up @@ -1004,9 +1004,11 @@ def open_project_item(self, item: typing.Any) -> None:
def __deep_copy(self) -> None:
self._dispatch_any_to_focus_widget("handle_deep_copy")

def handle_undo(self) -> None:
def handle_undo(self) -> bool:
if self.__undo_stack.can_undo:
self.__undo_stack.undo()
return True
return False

def get_undo_menu_item_state(self) -> UserInterface.MenuItemState:
self.__undo_stack.validate()
Expand Down

0 comments on commit ab27672

Please sign in to comment.