[Bf-blender-cvs] [77bd0a71b46] temp-geometry-nodes-attribute-search: Fix order of apply and all strings valid check
Hans Goudey
noreply at git.blender.org
Thu Feb 25 00:31:56 CET 2021
Commit: 77bd0a71b4636e7b4cdd48292b9f061b43bbc3b2
Author: Hans Goudey
Date: Wed Feb 24 16:32:14 2021 -0600
Branches: temp-geometry-nodes-attribute-search
https://developer.blender.org/rB77bd0a71b4636e7b4cdd48292b9f061b43bbc3b2
Fix order of apply and all strings valid check
===================================================================
M source/blender/editors/interface/interface_handlers.c
===================================================================
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index d4d7b324a5a..cab32e68c54 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -3407,12 +3407,13 @@ static void ui_textedit_end(bContext *C, uiBut *but, uiHandleButtonData *data)
}
if (data->searchbox) {
- BLI_assert(but->type == UI_BTYPE_SEARCH_MENU);
- uiButSearch *but_search = (uiButSearch *)but;
+ if (data->cancel == false) {
+ BLI_assert(but->type == UI_BTYPE_SEARCH_MENU);
+ uiButSearch *but_search = (uiButSearch *)but;
- if (data->cancel == false && !but_search->all_strings_valid) {
if ((ui_searchbox_apply(but, data->searchbox) == false) &&
- (ui_searchbox_find_index(data->searchbox, but->editstr) == -1)) {
+ (ui_searchbox_find_index(data->searchbox, but->editstr) == -1) &&
+ !but_search->all_strings_valid) {
data->cancel = true;
/* ensure menu (popup) too is closed! */
More information about the Bf-blender-cvs
mailing list