8000 See #6570. Better cost item rate identification · IfcOpenShell/IfcOpenShell@390349a · GitHub
[go: up one dir, main page]

Skip to content

Commit 390349a

Browse files
committed
See #6570. Better cost item rate identification
Now show cost item rate shows the Identification and not the ID for better understanding
1 parent eade620 commit 390349a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/bonsai/bonsai/bim/module/cost/operator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ class ShowAssignedCostRate(bpy.types.Operator):
613613
bl_idname = "bim.show_assigned_cost_rate"
614614
bl_label = "Info about the assigned cost item rate"
615615
bl_options = {"REGISTER"}
616-
assigned_rate_id: bpy.props.IntProperty()
616+
assigned_rate_identification: bpy.props.StringProperty()
617617
assigned_rate_name: bpy.props.StringProperty()
618618
assigned_rate_description: bpy.props.StringProperty()
619619
assigned_rate_total_value: bpy.props.FloatProperty()
@@ -629,7 +629,7 @@ def execute(self, context):
629629
def draw(self, context):
630630
layout = self.layout
631631
wrapper = textwrap.TextWrapper(width=80)
632-
layout.label(text=f"ID: {self.assigned_rate_id}")
632+
layout.label(text=f"ID: {self.assigned_rate_identification}")
633633
layout.label(text=f"Name: {self.assigned_rate_name}")
634634
layout.label(text="Description:")
635635
for line in wrapper.wrap(str(self.assigned_rate_description)):

src/bonsai/bonsai/bim/module/cost/ui.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,8 @@ def draw_assigned_rate_column(self, layout, cost_item):
733733
row.alignment = "LEFT"
734734
if cost_item["AssignedCostRate"] is not None:
735735
op = row.operator("bim.show_assigned_cost_rate", text="", emboss=False, icon="ZOOM_IN")
736-
op.assigned_rate_id = cost_item["AssignedCostRate"].id()
736+
identification = cost_item["AssignedCostRate"].Identification
737+
op.assigned_rate_identification = identification if identification is not None else "XXX"
737738
op.assigned_rate_name = cost_item["AssignedCostRate"].Name or ""
738739
op.assigned_rate_description = cost_item["AssignedCostRate"].Description or ""
739740
op.assigned_rate_total_value = CostSchedulesData.data["cost_items"][cost_item["AssignedCostRate"].id()][

0 commit comments

Comments
 (0)
0