From c250b2c1a70d97fa288a4f29aa9bafbbf69a738b Mon Sep 17 00:00:00 2001 From: Gorgious56 Date: Thu, 28 May 2026 15:30:46 +0200 Subject: [PATCH] Gate parametric-edit array gizmo until integration completes The framework's parametric-edit icon row currently binds an array icon to bim.add_array_from_feature_edit, but the supporting per- feature add-array flow and gizmo positioning haven't fully landed. Showing the icon today lets the user click it and trigger a half- wired flow. Force the icon hidden inside the props.is_editing branch of BaseParametricGizmoGroup.update_editing_gizmos. The else-branch (not editing) already hides it, so this just mirrors that behavior during edit mode. Drop this gate when array integration completes to re-enable the icon position + visibility plumbing. Generated with the assistance of an AI coding tool. --- .../bonsai/bim/module/drawing/gizmos.py | 25 ++++++------------- 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/src/bonsai/bonsai/bim/module/drawing/gizmos.py b/src/bonsai/bonsai/bim/module/drawing/gizmos.py index 519451d47b..f025df38a4 100644 --- a/src/bonsai/bonsai/bim/module/drawing/gizmos.py +++ b/src/bonsai/bonsai/bim/module/drawing/gizmos.py @@ -5900,25 +5900,14 @@ class BaseParametricGizmoGroup: billboard_rot=billboard_rot, scale=0.30, ) - # ARRAY button sits past the last feature-specific icon. Each - # gizmo group declares its own ``FEATURE_ICON_MAX_X`` (default - # 0.87 past the cycle slot; wall / stair override it) so the - # ARRAY button never lands on top of a rotate / tread-lock icon. + # Array gizmo integration is in-progress: the icon binds to + # bim.add_array_from_feature_edit but the array-from-parametric-draft + # operator + per-feature gizmo positioning haven't fully landed. + # Force-hide the icon while parametric-item editing is active to + # keep the user from triggering a half-wired add-array flow. Drop + # this gate when array integration completes. if hasattr(self, "array_gizmo"): - self.array_gizmo.hide = self.is_gizmo_hidden_by_modal(self.array_gizmo) - # 30% smaller than the editing-icon-row default (0.50 → 0.35): - # the array button is a tertiary affordance compared to the - # primary pen / validate / cancel triad, and the smaller - # footprint keeps the edit-mode row from sprawling. - self.set_icon_gizmo_position( - "array_gizmo", - mw=mw, - x=self.ICON_VALIDATE_X + self.FEATURE_ICON_MAX_X + self.ICON_ARRAY_GAP, - y=icon_y, - z=icon_z, - billboard_rot=billboard_rot, - scale=0.35, - ) + self.array_gizmo.hide = True else: # ``hide_pen_button = True`` keeps the pen permanently hidden — for # groups whose edit-mode entry is already provided by another widget