Draft: fix constrain error if there is no new point (#26868)
* Add None check before constraining new_point * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -1719,7 +1719,10 @@ class DraftToolBar:
|
||||
self.mask = val
|
||||
if hasattr(FreeCADGui, "Snapper"):
|
||||
FreeCADGui.Snapper.mask = val
|
||||
self.new_point = FreeCADGui.Snapper.constrain(self.new_point, self.get_last_point())
|
||||
if self.new_point is not None:
|
||||
self.new_point = FreeCADGui.Snapper.constrain(
|
||||
self.new_point, self.get_last_point()
|
||||
)
|
||||
|
||||
def changeXValue(self, d):
|
||||
if self.display_point_active:
|
||||
|
||||
Reference in New Issue
Block a user