Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft: fix Draft_Arc_3Points task panel issues #5250

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 10 additions & 2 deletions src/Mod/Draft/draftguitools/gui_arcs.py
Expand Up @@ -510,8 +510,10 @@ def Activated(self):
App.DraftWorkingPlane.setup()

Gui.Snapper.getPoint(callback=self.getPoint,
movecallback=self.drawArc,
title=translate("draft","Arc by 3 points"))
movecallback=self.drawArc)
Gui.Snapper.ui.setTitle(title=translate("draft", "Arc by 3 points"),
icon="Draft_Arc_3Points")
Gui.Snapper.ui.continueCmd.show()

def getPoint(self, point, info):
"""Get the point by clicking on the 3D view.
Expand Down Expand Up @@ -551,6 +553,10 @@ def getPoint(self, point, info):
Gui.Snapper.getPoint(last=self.points[-1],
callback=self.getPoint,
movecallback=self.drawArc)
Gui.Snapper.ui.setTitle(title=translate("draft", "Arc by 3 points"),
icon="Draft_Arc_3Points")
Gui.Snapper.ui.continueCmd.show()

else:
# If three points were already picked in the 3D view
# proceed with creating the final object.
Expand All @@ -565,6 +571,8 @@ def getPoint(self, point, info):
self.points[2]], primitive=False)
self.tracker.off()
self.doc.recompute()
if Gui.Snapper.ui.continueMode:
self.Activated()

def drawArc(self, point, info):
"""Draw preview arc when we move the pointer in the 3D view.
Expand Down