mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 23:36:20 +00:00
See #6570. Better cost item rate identification
Now show cost item rate shows the Identification and not the ID for better understanding
This commit is contained in:
committed by
Massimo Fabbro
parent
eade620581
commit
390349aa7a
@@ -613,7 +613,7 @@ class ShowAssignedCostRate(bpy.types.Operator):
|
|||||||
bl_idname = "bim.show_assigned_cost_rate"
|
bl_idname = "bim.show_assigned_cost_rate"
|
||||||
bl_label = "Info about the assigned cost item rate"
|
bl_label = "Info about the assigned cost item rate"
|
||||||
bl_options = {"REGISTER"}
|
bl_options = {"REGISTER"}
|
||||||
assigned_rate_id: bpy.props.IntProperty()
|
assigned_rate_identification: bpy.props.StringProperty()
|
||||||
assigned_rate_name: bpy.props.StringProperty()
|
assigned_rate_name: bpy.props.StringProperty()
|
||||||
assigned_rate_description: bpy.props.StringProperty()
|
assigned_rate_description: bpy.props.StringProperty()
|
||||||
assigned_rate_total_value: bpy.props.FloatProperty()
|
assigned_rate_total_value: bpy.props.FloatProperty()
|
||||||
@@ -629,7 +629,7 @@ class ShowAssignedCostRate(bpy.types.Operator):
|
|||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
wrapper = textwrap.TextWrapper(width=80)
|
wrapper = textwrap.TextWrapper(width=80)
|
||||||
layout.label(text=f"ID: {self.assigned_rate_id}")
|
layout.label(text=f"ID: {self.assigned_rate_identification}")
|
||||||
layout.label(text=f"Name: {self.assigned_rate_name}")
|
layout.label(text=f"Name: {self.assigned_rate_name}")
|
||||||
layout.label(text="Description:")
|
layout.label(text="Description:")
|
||||||
for line in wrapper.wrap(str(self.assigned_rate_description)):
|
for line in wrapper.wrap(str(self.assigned_rate_description)):
|
||||||
|
|||||||
@@ -733,7 +733,8 @@ class BIM_UL_cost_items_trait:
|
|||||||
row.alignment = "LEFT"
|
row.alignment = "LEFT"
|
||||||
if cost_item["AssignedCostRate"] is not None:
|
if cost_item["AssignedCostRate"] is not None:
|
||||||
op = row.operator("bim.show_assigned_cost_rate", text="", emboss=False, icon="ZOOM_IN")
|
op = row.operator("bim.show_assigned_cost_rate", text="", emboss=False, icon="ZOOM_IN")
|
||||||
op.assigned_rate_id = cost_item["AssignedCostRate"].id()
|
identification = cost_item["AssignedCostRate"].Identification
|
||||||
|
op.assigned_rate_identification = identification if identification is not None else "XXX"
|
||||||
op.assigned_rate_name = cost_item["AssignedCostRate"].Name or ""
|
op.assigned_rate_name = cost_item["AssignedCostRate"].Name or ""
|
||||||
op.assigned_rate_description = cost_item["AssignedCostRate"].Description or ""
|
op.assigned_rate_description = cost_item["AssignedCostRate"].Description or ""
|
||||||
op.assigned_rate_total_value = CostSchedulesData.data["cost_items"][cost_item["AssignedCostRate"].id()][
|
op.assigned_rate_total_value = CostSchedulesData.data["cost_items"][cost_item["AssignedCostRate"].id()][
|
||||||
|
|||||||
Reference in New Issue
Block a user