diff --git a/src/blenderbim/blenderbim/bim/module/cost/prop.py b/src/blenderbim/blenderbim/bim/module/cost/prop.py index 4b65b1ea9a..cdd5e08e92 100644 --- a/src/blenderbim/blenderbim/bim/module/cost/prop.py +++ b/src/blenderbim/blenderbim/bim/module/cost/prop.py @@ -137,7 +137,7 @@ class CostItemType(PropertyGroup): def update_cost_item_parent(self, context): cost_item = tool.Cost.get_highlighted_cost_item() - tool.Cost.toggle_cost_item_parent(cost_item=cost_item) + tool.Cost.toggle_cost_item_parent_change(cost_item=cost_item) def update_active_cost_item_elements(self, context): diff --git a/src/blenderbim/blenderbim/bim/module/cost/ui.py b/src/blenderbim/blenderbim/bim/module/cost/ui.py index 076df54d3b..f0aa85c2e5 100644 --- a/src/blenderbim/blenderbim/bim/module/cost/ui.py +++ b/src/blenderbim/blenderbim/bim/module/cost/ui.py @@ -51,7 +51,7 @@ class BIM_PT_cost_schedules(Panel): row = self.layout.row() row.prop(self.props, "cost_schedule_predefined_types") - row.operator("bim.add_cost_schedule", icon="ADD", text="Add new") + row.operator("bim.add_cost_schedule", icon="ADD", text="Add") for schedule in CostSchedulesData.data["schedules"]: self.draw_cost_schedule_ui(schedule) @@ -594,7 +594,7 @@ class BIM_UL_cost_items_trait: layout.label(text=text) def draw_uom_column(self, layout, cost_item): - layout.label(text=cost_item["UnitBasisUnitSymbol"] or "?" if cost_item["UnitBasisValueComponent"] else "-") + layout.label(text=cost_item["UnitBasisUnitSymbol"] or "-" if cost_item["UnitBasisValueComponent"] else "-") def draw_order_operator(self, row, ifc_definition_id, cost_item): if cost_item["NestingIndex"] is not None: @@ -608,7 +608,14 @@ class BIM_UL_cost_items_trait: op.new_index = cost_item["NestingIndex"] - 1 def draw_total_quantity_column(self, layout, cost_item): - layout.label(text="{0:.2f}".format(cost_item["TotalCostQuantity"]) + f" {cost_item['UnitSymbol'] or '?'}") + layout.label(text="{0:.2f}".format(cost_item["TotalCostQuantity"]) + f" {cost_item['UnitSymbol'] or '-'}") + # if cost_item["DerivedTotalCostQuantity"] not in [None, 0]: + # layout.label(text="{0:.2f}".format(cost_item["DerivedTotalCostQuantity"]) + f" {cost_item['DerivedUnitSymbol'] or '-'}") + # else: + # if cost_item["TotalCostQuantity"] == 0: + # layout.label(text="-") + # else: + # layout.label(text="{0:.2f}".format(cost_item["TotalCostQuantity"]) + f" {cost_item['UnitSymbol'] or '-'}") class BIM_UL_cost_items(BIM_UL_cost_items_trait, UIList): diff --git a/src/blenderbim/blenderbim/core/cost.py b/src/blenderbim/blenderbim/core/cost.py index 9c4df303df..3290580504 100644 --- a/src/blenderbim/blenderbim/core/cost.py +++ b/src/blenderbim/blenderbim/core/cost.py @@ -268,9 +268,8 @@ def highlight_product_cost_item(spatial, cost, cost_item): else: return "Cost schedule is not active" - -def toggle_cost_item_parent_change(cost, cost_item): - cost.toggle_cost_item_parent_change(cost_item) +def toggle_cost_item_parent(cost, cost_item): + cost.toggle_cost_item_parent(cost_item) def change_parent_cost_item(ifc, cost, new_parent):