@@ -118,7 +118,7 @@ def _get_effective_classname(button):
118118
119119 This means that typemaker has created a executor type for this command.
120120 If class_name is not set, this function returns button.unique_name.
121- This allows for the UI button to be created and linked to the previously
121+ This allows for the UI button to be created and linked to the previously
122122 created assembly.
123123 If the type does not exist in the assembly, the UI button will not work,
124124 however this allows updating the command with the correct executor type,
@@ -505,6 +505,13 @@ def _produce_ui_stacks(ui_maker_params):
505505 try :
506506 parent_ui_panel .close_stack ()
507507 mlogger .debug ('Closed stack: %s' , stack_cmp .name )
508+ for component in stack_cmp :
509+ if hasattr (component , 'highlight_type' ) and component .highlight_type :
510+ # Get the UI item for this component
511+ ui_item = parent_ui_panel .button (component .name )
512+ if ui_item :
513+ _set_highlights (component , ui_item )
514+ mlogger .debug ('Set highlights on stack: %s' , stack_cmp .name )
508515 return stack_cmp
509516 except PyRevitException as err :
510517 mlogger .error ('Error creating stack | %s' , err )
@@ -542,7 +549,7 @@ def _produce_ui_panelpushbutton(ui_maker_params):
542549 avail_class_name = panelpushbutton .avail_class_name ,
543550 update_if_exists = True ,
544551 ui_title = _make_ui_title (panelpushbutton ))
545-
552+
546553 panelpushbutton_ui = parent_ui_item .button (panelpushbutton .name )
547554
548555 _set_highlights (panelpushbutton , panelpushbutton_ui )
0 commit comments