Draft: Made the grid appear on module activation

This commit is contained in:
Yorik van Havre 2012-06-07 10:43:32 -03:00
parent db8ebb31e6
commit 04d2103566

View File

@ -883,7 +883,7 @@ class Snapper:
return False
def show(self):
"shows the toolbar"
"shows the toolbar and the grid"
if not hasattr(self,"toolbar"):
self.makeSnapToolBar()
mw = getMainWindow()
@ -891,6 +891,11 @@ class Snapper:
if not bt:
mw.addToolBar(self.toolbar)
self.toolbar.show()
if FreeCADGui.ActiveDocument:
if not self.forceGridOff:
if not self.grid:
self.grid = DraftTrackers.gridTracker()
self.grid.set()
def setGrid(self):
"sets the grid, if visible"