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:
2014-09-10 12:53:22 +02:00
parent 1811ffff5d
commit 965205d0e2
2 changed files with 9 additions and 0 deletions

View File

@@ -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;
}
}