From 0b036ab58aeb37b55849403d15f0614714dbe5cf Mon Sep 17 00:00:00 2001 From: Roy-043 Date: Fri, 5 Jan 2024 10:50:46 +0100 Subject: [PATCH] Draft: gui_snapper: setTrackers can be called if there is no 3D view --- src/Mod/Draft/draftguitools/gui_snapper.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Mod/Draft/draftguitools/gui_snapper.py b/src/Mod/Draft/draftguitools/gui_snapper.py index 2f6ced7979c5..fdc1483d18f2 100644 --- a/src/Mod/Draft/draftguitools/gui_snapper.py +++ b/src/Mod/Draft/draftguitools/gui_snapper.py @@ -1569,14 +1569,15 @@ def hide(self): def setGrid(self): """Set the grid, if visible.""" self.setTrackers() - if self.grid.Visible: - self.grid.set() def setTrackers(self, update_grid=True): """Set the trackers.""" v = Draft.get3DView() - if v and (v != self.activeview): + if v is None: + return + + if v != self.activeview: if v in self.trackers[0]: i = self.trackers[0].index(v) self.grid = self.trackers[1][i]