Include other Draft commands

This commit is contained in:
Roy-043
2024-11-30 16:48:41 +01:00
parent e40cab88ad
commit 0ae35d6bab
8 changed files with 75 additions and 46 deletions

View File

@@ -124,11 +124,15 @@ class CircularArray(gui_base.GuiCommandBase):
We should remove the callbacks that were added to the 3D view
and then close the task panel.
"""
self.view.removeEventCallbackPivy(self.location,
self.callback_move)
self.view.removeEventCallbackPivy(self.mouse_event,
self.callback_click)
gui_utils.end_all_events()
try:
self.view.removeEventCallbackPivy(self.location, self.callback_move)
self.view.removeEventCallbackPivy(self.mouse_event, self.callback_click)
gui_utils.end_all_events()
except RuntimeError:
# the view has been deleted already
pass
self.callback_move = None
self.callback_click = None
if Gui.Control.activeDialog():
Gui.Control.closeDialog()
self.finish()