Fix T48171: activating spacebar search menu over text button activates it or shows tooltip.
This commit is contained in:
parent
557544f2c4
commit
667a5ef48e
Notes:
blender-bot
2023-02-14 07:58:31 +01:00
Referenced by issue #48171, textbox and search active at the same time
|
@ -6537,7 +6537,6 @@ static void menu_add_shortcut_cancel(struct bContext *C, void *arg1)
|
|||
static void popup_change_shortcut_func(bContext *C, void *arg1, void *UNUSED(arg2))
|
||||
{
|
||||
uiBut *but = (uiBut *)arg1;
|
||||
UI_but_tooltip_timer_remove(C, but);
|
||||
UI_popup_block_invoke(C, menu_change_shortcut, but);
|
||||
}
|
||||
|
||||
|
@ -6559,7 +6558,6 @@ static void remove_shortcut_func(bContext *C, void *arg1, void *UNUSED(arg2))
|
|||
static void popup_add_shortcut_func(bContext *C, void *arg1, void *UNUSED(arg2))
|
||||
{
|
||||
uiBut *but = (uiBut *)arg1;
|
||||
UI_but_tooltip_timer_remove(C, but);
|
||||
UI_popup_block_ex(C, menu_add_shortcut, NULL, menu_add_shortcut_cancel, but);
|
||||
}
|
||||
|
||||
|
@ -6608,8 +6606,6 @@ static bool ui_but_menu(bContext *C, uiBut *but)
|
|||
return false;
|
||||
}
|
||||
|
||||
UI_but_tooltip_timer_remove(C, but);
|
||||
|
||||
/* highly unlikely getting the label ever fails */
|
||||
UI_but_string_info_get(C, but, &label, NULL);
|
||||
|
||||
|
|
|
@ -1965,11 +1965,17 @@ uiPopupBlockHandle *ui_popup_block_create(
|
|||
void *arg)
|
||||
{
|
||||
wmWindow *window = CTX_wm_window(C);
|
||||
uiBut *activebut = UI_context_active_but_get(C);
|
||||
static ARegionType type;
|
||||
ARegion *ar;
|
||||
uiBlock *block;
|
||||
uiPopupBlockHandle *handle;
|
||||
|
||||
/* disable tooltips from buttons below */
|
||||
if (activebut) {
|
||||
UI_but_tooltip_timer_remove(C, activebut);
|
||||
}
|
||||
|
||||
/* create handle */
|
||||
handle = MEM_callocN(sizeof(uiPopupBlockHandle), "uiPopupBlockHandle");
|
||||
|
||||
|
|
|
@ -413,7 +413,7 @@ void wm_event_do_notifiers(bContext *C)
|
|||
static int wm_event_always_pass(wmEvent *event)
|
||||
{
|
||||
/* some events we always pass on, to ensure proper communication */
|
||||
return ISTIMER(event->type) || (event->type == WINDEACTIVATE) || (event->type == EVT_BUT_OPEN);
|
||||
return ISTIMER(event->type) || (event->type == WINDEACTIVATE);
|
||||
}
|
||||
|
||||
/* ********************* ui handler ******************* */
|
||||
|
|
Loading…
Reference in New Issue