Draft: cleanup related to PR11336

See #11336
This commit is contained in:
Roy-043
2023-11-14 11:51:34 +01:00
parent 8b6d133c26
commit 0f76aaab86
3 changed files with 5 additions and 6 deletions

View File

@@ -133,7 +133,7 @@ class DraftTool:
if utils.get_param("showPlaneTracker", False):
self.planetrack = trackers.PlaneTracker()
if hasattr(Gui, "Snapper"):
Gui.Snapper.setTrackers(tool=True)
Gui.Snapper.setTrackers()
_msg("{}".format(16*"-"))
_msg("GuiCommand: {}".format(self.featureName))

View File

@@ -53,7 +53,6 @@ import draftguitools.gui_trackers as trackers
from draftutils.init_tools import get_draft_snap_commands
from draftutils.messages import _wrn
from draftutils.translate import translate
from draftutils.todo import ToDo
__title__ = "FreeCAD Draft Snap tools"
__author__ = "Yorik van Havre"
@@ -1607,14 +1606,14 @@ class Snapper:
self.show_hide_grids(show=False)
def setGrid(self, tool=False):
def setGrid(self):
"""Set the grid, if visible."""
self.setTrackers()
if self.grid.Visible:
self.grid.set(tool)
self.grid.set()
def setTrackers(self, tool=False, update_grid=True):
def setTrackers(self, update_grid=True):
"""Set the trackers."""
v = Draft.get3DView()
if v and (v != self.activeview):

View File

@@ -1237,7 +1237,7 @@ class gridTracker(Tracker):
self.numlines = Draft.getParam("gridSize", 100)
self.update()
def set(self,tool=False):
def set(self):
"""Move and rotate the grid according to the current working plane."""
self.reset()
wp = self._get_wp()