Draft: Fix setEdit in view_text.py

The setEdit function should import the Draft module to make sure draftToolBar is available.
This commit is contained in:
Roy-043
2022-07-12 13:14:37 +02:00
committed by GitHub
parent ff802c7274
commit 2f9c0713b2

View File

@@ -221,7 +221,9 @@ class ViewProviderText(ViewProviderDraftAnnotation):
def setEdit(self,vobj,mode):
import FreeCADGui
self.text = ''
if not hasattr(FreeCADGui, "draftToolBar"):
import Draft
self.text = ""
FreeCADGui.draftToolBar.sourceCmd = self
FreeCADGui.draftToolBar.taskUi()
FreeCADGui.draftToolBar.textUi()