mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-23 06:42:38 +00:00
Make Type Attributes panel values select_similar buttons
Each attribute value in BIM_PT_type_attributes is now a bim.select_similar button with key "type.<Attribute>" (the selector walks type. natively), mirroring the object Attributes panel pattern. This gives type attributes the full modifier scheme - select, SHIFT remove, CTRL filter, CTRL+SHIFT sum, ALT unhide, CTRL+ALT regex dialog - with no operator changes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -134,6 +134,14 @@ value — values containing regex metacharacters (e.g. `(`) need escaping before
|
|||||||
Overriding `draw()` for the dialog means the F9 redo panel no longer auto-lists the
|
Overriding `draw()` for the dialog means the F9 redo panel no longer auto-lists the
|
||||||
operator's internal properties for normal runs (it was exposing internals anyway).
|
operator's internal properties for normal runs (it was exposing internals anyway).
|
||||||
|
|
||||||
|
### Type Attributes panel hooks into the scheme
|
||||||
|
|
||||||
|
`BIM_PT_type_attributes` (type/ui.py) now renders each attribute value as a
|
||||||
|
`bim.select_similar` button with `key = "type.<Attribute>"` — the same
|
||||||
|
label-as-button pattern the object Attributes panel uses (attribute/ui.py). The
|
||||||
|
selector walks `type.` natively, so the full scheme (SHIFT/CTRL/CTRL+SHIFT
|
||||||
|
sum/ALT/CTRL+ALT regex) applies to type attributes with no operator changes.
|
||||||
|
|
||||||
### Deliberately overwritten SHIFT bindings (to be reworked later)
|
### Deliberately overwritten SHIFT bindings (to be reworked later)
|
||||||
|
|
||||||
Two operators already used SHIFT; the owner chose to overwrite them and revisit with
|
Two operators already used SHIFT; the owner chose to overwrite them and revisit with
|
||||||
|
|||||||
@@ -151,7 +151,8 @@ class BIM_PT_type_attributes(Panel):
|
|||||||
row = layout.row(align=True)
|
row = layout.row(align=True)
|
||||||
row.label(text=attribute["name"])
|
row.label(text=attribute["name"])
|
||||||
value = get_display_value(attribute["value"])
|
value = get_display_value(attribute["value"])
|
||||||
row.label(text=value)
|
op = row.operator("bim.select_similar", text=value, icon="NONE", emboss=False)
|
||||||
|
op.key = f"type.{attribute['name']}"
|
||||||
|
|
||||||
|
|
||||||
def add_object_button(self, context):
|
def add_object_button(self, context):
|
||||||
|
|||||||
Reference in New Issue
Block a user