Update gui_ellipses.py
Gui.addModule("Draft") should be executed before committing _cmd_list irrespective of the UsePartPrimitives setting.
This commit is contained in:
@@ -104,9 +104,9 @@ class Ellipse(gui_base_original.Creator):
|
||||
rot2 = App.Placement(m)
|
||||
rot2 = rot2.Rotation
|
||||
rot = str((rot1.multiply(rot2)).Q)
|
||||
Gui.addModule("Draft")
|
||||
if utils.getParam("UsePartPrimitives", False):
|
||||
# Insert a Part::Primitive object
|
||||
Gui.addModule("Part")
|
||||
_cmd = 'FreeCAD.ActiveDocument.'
|
||||
_cmd += 'addObject("Part::Ellipse", "Ellipse")'
|
||||
_cmd_list = ['ellipse = ' + _cmd,
|
||||
@@ -122,7 +122,6 @@ class Ellipse(gui_base_original.Creator):
|
||||
_cmd_list)
|
||||
else:
|
||||
# Insert a Draft ellipse
|
||||
Gui.addModule("Draft")
|
||||
_cmd = 'Draft.makeEllipse'
|
||||
_cmd += '('
|
||||
_cmd += str(r1) + ', ' + str(r2) + ', '
|
||||
|
||||
Reference in New Issue
Block a user