Update gui_arcs.py

Gui.addModule("Draft") should be executed before committing _cmd_list irrespective of the UsePartPrimitives setting.
This commit is contained in:
Roy-043
2021-04-29 21:05:52 +02:00
committed by GitHub
parent 7fa3869116
commit a3778eacd4

View File

@@ -301,6 +301,7 @@ class Arc(gui_base_original.Creator):
try:
# The command to run is built as a series of text strings
# to be committed through the `draftutils.todo.ToDo` class.
Gui.addModule("Draft")
if utils.getParam("UsePartPrimitives", False):
# Insert a Part::Primitive object
_base = DraftVecUtils.toString(self.center)
@@ -318,7 +319,6 @@ class Arc(gui_base_original.Creator):
_cmd_list)
else:
# Insert a Draft circle
Gui.addModule("Draft")
_base = DraftVecUtils.toString(self.center)
_cmd = 'Draft.makeCircle'
_cmd += '('