mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-26 10:11:46 +00:00
Fix bug where you couldn't delete a quantity from a quantity set
This commit is contained in:
@@ -192,6 +192,9 @@ class EditPset(bpy.types.Operator):
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
|
for key, value in properties.items():
|
||||||
|
if isinstance(value, float):
|
||||||
|
properties[key] = round(value, 4)
|
||||||
ifcopenshell.api.run(
|
ifcopenshell.api.run(
|
||||||
"pset.edit_qto",
|
"pset.edit_qto",
|
||||||
self.file,
|
self.file,
|
||||||
|
|||||||
@@ -32,9 +32,12 @@ class Usecase:
|
|||||||
if prop.Name not in self.settings["properties"]:
|
if prop.Name not in self.settings["properties"]:
|
||||||
return
|
return
|
||||||
value = self.settings["properties"][prop.Name]
|
value = self.settings["properties"][prop.Name]
|
||||||
if prop.is_a("IfcPhysicalSimpleQuantity"):
|
name = prop.Name
|
||||||
prop[3] = float(value) if value else None
|
if value is None:
|
||||||
del self.settings["properties"][prop.Name]
|
self.file.remove(prop)
|
||||||
|
elif prop.is_a("IfcPhysicalSimpleQuantity"):
|
||||||
|
prop[3] = float(value)
|
||||||
|
del self.settings["properties"][name]
|
||||||
|
|
||||||
def add_new_properties(self):
|
def add_new_properties(self):
|
||||||
properties = []
|
properties = []
|
||||||
|
|||||||
Reference in New Issue
Block a user