diff --git a/src/Mod/Draft/Resources/ui/TaskSelectPlane.ui b/src/Mod/Draft/Resources/ui/TaskSelectPlane.ui
index 0402aa8e62..690dc214cf 100644
--- a/src/Mod/Draft/Resources/ui/TaskSelectPlane.ui
+++ b/src/Mod/Draft/Resources/ui/TaskSelectPlane.ui
@@ -6,8 +6,8 @@
0
0
- 200
- 547
+ 210
+ 568
@@ -192,7 +192,7 @@ will be moved to the center of the view
- -
+
-
The distance at which a point can be snapped to
@@ -201,7 +201,7 @@ value by using the [ and ] keys while drawing
- -
+
-
The distance at which a point can be snapped to
@@ -213,6 +213,26 @@ value by using the [ and ] keys while drawing
+ -
+
+
+ Grid extension
+
+
+
+ -
+
+
+ lines
+
+
+ 1
+
+
+ 9999
+
+
+
-
diff --git a/src/Mod/Draft/draftguitools/gui_selectplane.py b/src/Mod/Draft/draftguitools/gui_selectplane.py
index 248c4478c2..b4d61d57df 100644
--- a/src/Mod/Draft/draftguitools/gui_selectplane.py
+++ b/src/Mod/Draft/draftguitools/gui_selectplane.py
@@ -102,6 +102,7 @@ class Draft_SelectPlane:
q = FreeCAD.Units.Quantity(self.param.GetFloat("gridSpacing", 1.0), FreeCAD.Units.Length)
self.taskd.form.fieldGridSpacing.setText(q.UserString)
self.taskd.form.fieldGridMainLine.setValue(self.param.GetInt("gridEvery", 10))
+ self.taskd.form.fieldGridExtension.setValue(self.param.GetInt("gridSize", 100))
self.taskd.form.fieldSnapRadius.setValue(self.param.GetInt("snapRange", 8))
# Set icons
@@ -126,6 +127,7 @@ class Draft_SelectPlane:
self.taskd.form.buttonPrevious.clicked.connect(self.onClickPrevious)
self.taskd.form.fieldGridSpacing.textEdited.connect(self.onSetGridSize)
self.taskd.form.fieldGridMainLine.valueChanged.connect(self.onSetMainline)
+ self.taskd.form.fieldGridExtension.valueChanged.connect(self.onSetExtension)
self.taskd.form.fieldSnapRadius.valueChanged.connect(self.onSetSnapRadius)
# Try to find a WP from the current selection
@@ -475,6 +477,13 @@ class Draft_SelectPlane:
if hasattr(FreeCADGui, "Snapper"):
FreeCADGui.Snapper.setGrid()
+ def onSetExtension(self, i):
+ """Execute when setting grid extension."""
+ if i > 1:
+ self.param.SetInt("gridSize", i)
+ if hasattr(FreeCADGui, "Snapper"):
+ FreeCADGui.Snapper.setGrid()
+
def onSetSnapRadius(self, i):
"""Execute when setting the snap radius."""
self.param.SetInt("snapRange", i)