updates
This commit is contained in:
15
InitGui.py
15
InitGui.py
@@ -39,9 +39,11 @@ class PVPlantWorkbench(Workbench):
|
||||
ToolTip = "Workbench for PV design"
|
||||
Icon = str(os.path.join(DirIcons, "icon.svg"))
|
||||
|
||||
def __init__(self):
|
||||
''' init '''
|
||||
|
||||
def Initialize(self):
|
||||
|
||||
#sys.path.append(r"C:\Users\javie\AppData\Roaming\FreeCAD\Mod")
|
||||
sys.path.append(os.path.join(FreeCAD.getUserAppDataDir(), 'Mod'))
|
||||
import PVPlantTools, reload
|
||||
|
||||
@@ -144,7 +146,10 @@ class PVPlantWorkbench(Workbench):
|
||||
from widgets import CountSelection
|
||||
|
||||
def Activated(self):
|
||||
"This function is executed when the workbench is activated"
|
||||
"""This function is executed when the workbench is activated"""
|
||||
|
||||
FreeCAD.Console.PrintLog("Road workbench activated.\n")
|
||||
|
||||
import SelectionObserver
|
||||
import FreeCADGui
|
||||
|
||||
@@ -153,7 +158,9 @@ class PVPlantWorkbench(Workbench):
|
||||
return
|
||||
|
||||
def Deactivated(self):
|
||||
"This function is executed when the workbench is deactivated"
|
||||
"""This function is executed when the workbench is deactivated"""
|
||||
|
||||
FreeCAD.Console.PrintLog("Road workbench deactivated.\n")
|
||||
|
||||
#FreeCADGui.Selection.removeObserver(self.observer)
|
||||
return
|
||||
@@ -201,4 +208,4 @@ class PVPlantWorkbench(Workbench):
|
||||
return "Gui::PythonWorkbench"
|
||||
|
||||
|
||||
Gui.addWorkbench(PVPlantWorkbench())
|
||||
FreeCADGui.addWorkbench(PVPlantWorkbench())
|
||||
|
||||
Reference in New Issue
Block a user