diff --git a/source/blender/editors/interface/interface_handlers.cc b/source/blender/editors/interface/interface_handlers.cc index 95ddb16c108..bafa2febca7 100644 --- a/source/blender/editors/interface/interface_handlers.cc +++ b/source/blender/editors/interface/interface_handlers.cc @@ -9115,13 +9115,6 @@ void ui_but_activate_event(bContext *C, ARegion *region, uiBut *but) void ui_but_activate_over(bContext *C, ARegion *region, uiBut *but) { - /* If there is an active button in the currently active region, - * then add UI_SELECT_DRAW to the to-be-activated button. */ - ARegion *active_region = CTX_wm_region(C); - if (active_region && ui_region_find_active_but(active_region)) { - but->flag |= UI_SELECT_DRAW; - } - button_activate_init(C, region, but, BUTTON_ACTIVATE_OVER); } diff --git a/source/blender/editors/interface/interface_region_menu_popup.cc b/source/blender/editors/interface/interface_region_menu_popup.cc index 650801e8855..0332c309b13 100644 --- a/source/blender/editors/interface/interface_region_menu_popup.cc +++ b/source/blender/editors/interface/interface_region_menu_popup.cc @@ -344,6 +344,11 @@ static uiBlock *ui_block_func_POPUP(bContext *C, uiPopupBlockHandle *handle, voi * to be within the window bounds may move it away from the mouse, * This ensures we set an item to be active. */ if (but_activate) { + ARegion *region = CTX_wm_region(C); + if (region && region->regiontype == RGN_TYPE_TOOLS) { + /* In Toolbars, highlight the button with select color. */ + but_activate->flag |= UI_SELECT_DRAW; + } ui_but_activate_over(C, handle->region, but_activate); }