Skip to content

Commit

Permalink
Draft: fix to statusbar import on wb Activated and Deactivated
Browse files Browse the repository at this point in the history
Import statusbar related functions only if snapper is loaded
added new line at the end
  • Loading branch information
carlopav authored and berndhahnebach committed Apr 30, 2020
1 parent ea19060 commit 3fd9d48
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/Mod/Draft/InitGui.py
Expand Up @@ -130,8 +130,8 @@ def Activated(self):
FreeCADGui.draftToolBar.Activated()
if hasattr(FreeCADGui, "Snapper"):
FreeCADGui.Snapper.show()
import draftutils.init_draft_statusbar as dsb
dsb.show_draft_statusbar()
import draftutils.init_draft_statusbar as dsb
dsb.show_draft_statusbar()
FreeCAD.Console.PrintLog("Draft workbench activated.\n")

def Deactivated(self):
Expand All @@ -140,8 +140,8 @@ def Deactivated(self):
FreeCADGui.draftToolBar.Deactivated()
if hasattr(FreeCADGui, "Snapper"):
FreeCADGui.Snapper.hide()
import draftutils.init_draft_statusbar as dsb
dsb.hide_draft_statusbar()
import draftutils.init_draft_statusbar as dsb
dsb.hide_draft_statusbar()
FreeCAD.Console.PrintLog("Draft workbench deactivated.\n")

def ContextMenu(self, recipient):
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/Draft/draftviewproviders/view_bezcurve.py
Expand Up @@ -38,4 +38,4 @@ def __init__(self, vobj):
super(ViewProviderBezCurve, self).__init__(vobj)


_ViewProviderBezCurve = ViewProviderBezCurve
_ViewProviderBezCurve = ViewProviderBezCurve
2 changes: 1 addition & 1 deletion src/Mod/Draft/draftviewproviders/view_bspline.py
Expand Up @@ -38,4 +38,4 @@ def __init__(self, vobj):
super(ViewProviderBSpline, self).__init__(vobj)


_ViewProviderBSpline = ViewProviderBSpline
_ViewProviderBSpline = ViewProviderBSpline

0 comments on commit 3fd9d48

Please sign in to comment.