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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user