Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Draft: Prevent Draft_Wire from setting a single-edge wire as closed
  • Loading branch information
marioalexis84 committed Jan 22, 2021
1 parent f30cbf6 commit 0f33a09
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Mod/Draft/draftguitools/gui_lines.py
Expand Up @@ -122,9 +122,13 @@ def action(self, arg):
if not self.isWire and len(self.node) == 2:
self.finish(False, cont=True)
if len(self.node) > 2:
# The wire is closed
if (self.point - self.node[0]).Length < utils.tolerance():
self.undolast()
self.finish(True, cont=True)
if len(self.node) > 2:
self.finish(True, cont=True)
else:
self.finish(False, cont=True)

def finish(self, closed=False, cont=False):
"""Terminate the operation and close the polyline if asked.
Expand Down

0 comments on commit 0f33a09

Please sign in to comment.