From 3f30ebf64aee964362874aaf985b092b8bc3de8e Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Fri, 3 Apr 2015 15:49:52 +0200 Subject: Fix related to T44243: do not systematically do live-update when tab-completing textedit buttons. We now have a specific flag for that, use it! Note that for all 'search menu' buttons, there is already a similar behavior, so there is no need to force apply butt in this case anyway, which means in practice this change only has effect in the single place it is needed currently - file browser dir/file fields. In this case (dir field), applying button even on partial matches leads code to ask to create a new dir, which breaks completely the expected behavior of completion. And we do not need immediate apply at all here. Note this is the only 'autocomplete' button not using search menu, so this change does not affect anything else in UI. --- source/blender/editors/interface/interface_handlers.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to '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 b4f26998c77..bc35fde633c 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -2864,8 +2864,6 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle if (autocomplete == AUTOCOMPLETE_FULL_MATCH) button_activate_state(C, but, BUTTON_STATE_EXIT); - - update = true; /* do live update for tab key */ } /* the hotkey here is not well defined, was G.qual so we check all */ else if (IS_EVENT_MOD(event, shift, ctrl, alt, oskey)) { @@ -2944,7 +2942,7 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle #endif if (changed) { - /* only update when typing for TAB key */ + /* only do live update when but flag request it (UI_BUT_TEXTEDIT_UPDATE). */ if (update && data->interactive) { ui_apply_but(C, block, but, data, true); } -- cgit v1.2.3