Esempio n. 1
0
 def Deactivated(self):
     """When quitting the workbench."""
     if hasattr(FreeCADGui, "draftToolBar"):
         FreeCADGui.draftToolBar.Deactivated()
     if hasattr(FreeCADGui, "Snapper"):
         FreeCADGui.Snapper.hide()
         import draftutils.init_draft_statusbar as dsb
         dsb.hide_draft_statusbar()
     FreeCAD.Console.PrintLog("Draft workbench deactivated.\n")
Esempio n. 2
0
 def Deactivated(self):
     try:
         "workbench deactivated"
         if hasattr(FreeCADGui, "draftToolBar"):
             Gui.draftToolBar.Deactivated()
         if hasattr(FreeCADGui, "Snapper"):
             Gui.Snapper.hide()
             import draftutils.init_draft_statusbar as dsb
             dsb.hide_draft_statusbar()
         App.Console.PrintLog("Design456/Draft workbench deactivated.\n")
         return
     except Exception as exc:
         App.Console.PrintError(exc)
         App.Console.PrintError("Error: Draft deactivation failed\n")
Esempio n. 3
0
 def Deactivated(self):
     from plane import Grid as gr
     # from plane import DocObserver
     try:
         "workbench deactivated"
         if hasattr(FreeCADGui, "draftToolBar"):
             Gui.draftToolBar.Deactivated()
         if hasattr(FreeCADGui, "Snapper"):
             Gui.Snapper.hide()
             import draftutils.init_draft_statusbar as dsb
             dsb.hide_draft_statusbar()
         App.Console.PrintLog("Design456/Draft workbench deactivated.\n")
         # gr.removeGarbage(gr)
         self.planeShow.removeGarbage()
         del self.planeShow
         self.planeShow = None
         App.removeDocumentObserver(self.myDocObserver)
         self.myDocObserver = None
         return
     except Exception as exc:
         App.Console.PrintError(exc)
         App.Console.PrintError("Error: Draft deactivation failed\n")