Merge pull request #5081 from Roy-043/Draft-prevent-negative-snaprange
Draft: prevent negative snaprange
This commit is contained in:
@@ -97,12 +97,12 @@ inCommandShortcuts = {
|
||||
None
|
||||
],
|
||||
"Increase": [
|
||||
Draft.getParam("inCommandShortcutIncrease", "["),
|
||||
Draft.getParam("inCommandShortcutIncreaseRadius", "["),
|
||||
translate("draft","Increase snap radius"),
|
||||
None
|
||||
],
|
||||
"Decrease": [
|
||||
Draft.getParam("inCommandShortcutDecrease", "]"),
|
||||
Draft.getParam("inCommandShortcutDecreaseRadius", "]"),
|
||||
translate("draft","Decrease snap radius"),
|
||||
None
|
||||
],
|
||||
@@ -2087,7 +2087,7 @@ class DraftToolBar:
|
||||
def toggleradius(self,val):
|
||||
if hasattr(FreeCADGui,"Snapper"):
|
||||
par = Draft.getParam("snapRange", 8)
|
||||
Draft.setParam("snapRange",par+val)
|
||||
Draft.setParam("snapRange", max(0, par+val))
|
||||
FreeCADGui.Snapper.showradius()
|
||||
|
||||
def constrain(self,val):
|
||||
|
||||
Reference in New Issue
Block a user