Draft: Fix grid update issue
If the grid spacing was updated in this sequence: 1 -> 0 -> 1 (or any sequence where the first and last value are equal), the grid would not be redrawn.
This commit is contained in:
@@ -1062,15 +1062,18 @@ class gridTracker(Tracker):
|
||||
if self.space == 0:
|
||||
self.lines1.numVertices.deleteValues(0)
|
||||
self.lines2.numVertices.deleteValues(0)
|
||||
self.pts = []
|
||||
FreeCAD.Console.PrintWarning("Draft Grid: Spacing value is zero\n")
|
||||
return
|
||||
if self.mainlines == 0:
|
||||
self.lines1.numVertices.deleteValues(0)
|
||||
self.lines2.numVertices.deleteValues(0)
|
||||
self.pts = []
|
||||
return
|
||||
if self.numlines == 0:
|
||||
self.lines1.numVertices.deleteValues(0)
|
||||
self.lines2.numVertices.deleteValues(0)
|
||||
self.pts = []
|
||||
return
|
||||
numlines = self.numlines // self.mainlines // 2 * 2 * self.mainlines
|
||||
bound = (numlines // 2) * self.space
|
||||
|
||||
Reference in New Issue
Block a user