If wires are merged, deleted, or otherwise had graph changing operations while edit mode is active, don't complain

This commit is contained in:
Dion Moult
2019-02-24 19:38:12 +11:00
committed by Yorik van Havre
parent a7b0b4f601
commit 131dc3720f

View File

@@ -4328,12 +4328,14 @@ class EditImproved(Modifier):
def restore_editable_objects_graphics(self):
for object in self.editable_objects:
if not object.Name:
continue
for attribute, value in self.original_view_settings[object.Name].items():
view_object = object.ViewObject
setattr(view_object, attribute, value)
view_object.RootNode.removeChild(view_object.RootNode.getByName("xray"))
try:
for attribute, value in self.original_view_settings[object.Name].items():
view_object = object.ViewObject
setattr(view_object, attribute, value)
view_object.RootNode.removeChild(view_object.RootNode.getByName("xray"))
except:
# This can occur if objects have had graph changing operations
pass
class Edit(Modifier):
"The Draft_Edit FreeCAD command definition"