Update gui_points.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:07:07 +02:00
committed by GitHub
parent a3778eacd4
commit e13bf0fac7

View File

@@ -119,6 +119,7 @@ class Point(gui_base_original.Creator):
# The command to run is built as a series of text strings
# to be committed through the `draftutils.todo.ToDo` class.
commitlist = []
Gui.addModule("Draft")
if utils.getParam("UsePartPrimitives", False):
# Insert a Part::Primitive object
_cmd = 'FreeCAD.ActiveDocument.'
@@ -133,7 +134,6 @@ class Point(gui_base_original.Creator):
_cmd_list))
else:
# Insert a Draft point
Gui.addModule("Draft")
_cmd = 'Draft.makePoint'
_cmd += '('
_cmd += str(self.stack[0][0]) + ', '