Fix two bugs with searchbox UI items.
First one, reported by Sergey, was searchbox not closing when validating it (enter or LMB click) without any active item (we need to enable escapecancel here, to close menu too). Second one was SEARCH_MENU_UNLINK variant not unlinking at validation when no active item. Thanks a bunch to Campbell for help here!
This commit is contained in:
@@ -2491,6 +2491,9 @@ static void ui_textedit_end(bContext *C, uiBut *but, uiHandleButtonData *data)
|
||||
(ui_searchbox_find_index(data->searchbox, but->editstr) == -1))
|
||||
{
|
||||
data->cancel = true;
|
||||
|
||||
/* ensure menu (popup) too is closed! */
|
||||
data->escapecancel = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user