mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 17:58:20 +00:00
Don't edit IFC when simply disabling window editing.
This commit is contained in:
@@ -415,13 +415,21 @@ class CancelEditingWindow(bpy.types.Operator, tool.Ifc.Operator):
|
|||||||
psets = ifcopenshell.util.element.get_psets(element)
|
psets = ifcopenshell.util.element.get_psets(element)
|
||||||
data = json.loads(psets["BBIM_Window"]["Data"])
|
data = json.loads(psets["BBIM_Window"]["Data"])
|
||||||
props = obj.BIMWindowProperties
|
props = obj.BIMWindowProperties
|
||||||
# restore previous settings since editing was canceled
|
|
||||||
for prop_name in data:
|
for prop_name in data:
|
||||||
setattr(props, prop_name, data[prop_name])
|
setattr(props, prop_name, data[prop_name])
|
||||||
update_window_modifier_representation(context)
|
|
||||||
|
body = ifcopenshell.util.representation.get_representation(element, "Model", "Body", "MODEL_VIEW")
|
||||||
|
core.switch_representation(
|
||||||
|
tool.Ifc,
|
||||||
|
tool.Geometry,
|
||||||
|
obj=obj,
|
||||||
|
representation=body,
|
||||||
|
should_reload=True,
|
||||||
|
is_global=True,
|
||||||
|
should_sync_changes_first=False,
|
||||||
|
)
|
||||||
|
|
||||||
props.is_editing = -1
|
props.is_editing = -1
|
||||||
|
|
||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user