From 9684e21d930c692ec144581da7e109b0c2cfaf54 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Fri, 26 Jul 2024 11:51:26 +0500 Subject: [PATCH] bsdd - hide domain selection operator for the active domain Example - https://imgur.com/a/SkpECro --- src/blenderbim/blenderbim/bim/module/bsdd/ui.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/blenderbim/blenderbim/bim/module/bsdd/ui.py b/src/blenderbim/blenderbim/bim/module/bsdd/ui.py index 7520d82188..d6bfe87823 100644 --- a/src/blenderbim/blenderbim/bim/module/bsdd/ui.py +++ b/src/blenderbim/blenderbim/bim/module/bsdd/ui.py @@ -79,14 +79,18 @@ class BIM_PT_bsdd(Panel): class BIM_UL_bsdd_domains(UIList): def draw_item(self, context, layout, data, item, icon, active_data, active_propname): if item: + props = context.scene.BIMBSDDProperties row = layout.row(align=True) if item.status != "Active": row.label(text=f"{item.name} ({item.organization_name_owner}) - {item.status}", icon="ERROR") else: row.label(text=f"{item.name} ({item.organization_name_owner})") - op = row.operator("bim.set_active_bsdd_domain", text="", icon="RESTRICT_SELECT_OFF") - op.name = item.name - op.uri = item.uri + if item.uri == props.active_uri: + row.label(text="", icon="URL") + else: + op = row.operator("bim.set_active_bsdd_domain", text="", icon="RESTRICT_SELECT_OFF") + op.name = item.name + op.uri = item.uri class BIM_UL_bsdd_classifications(UIList):