[Draft] Mitigate crash in Draft_Edit (#8749) (#8750)

This mitigates the crash reported in issue #8749.  The crash happens when
using Draft_Edit and using keyboard to enter a coordinate in Edit node
dialog.  This change partially restores behaviour before commit fc14567,
after which FreeCADGui.Control.closeDialog and showDialog calls during
execution of DraftToolBar.editUi are no longer made using the todo.delay
mechanism.  The crash can still be triggered by artificially slowing down key
event processing, so this is not a proper fix, just a mitigation.
This commit is contained in:
Hannu Koivisto
2023-03-11 18:44:04 +02:00
committed by GitHub
parent adb972319f
commit 57aac275c7

View File

@@ -1070,9 +1070,9 @@ class DraftToolBar:
if self.callback:
self.callback()
return True
FreeCADGui.Control.closeDialog()
todo.delay(FreeCADGui.Control.closeDialog,None)
panel = TaskPanel(extra, on_close_call)
FreeCADGui.Control.showDialog(panel)
todo.delay(FreeCADGui.Control.showDialog,panel)
#---------------------------------------------------------------------------