Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-06-19 15:53:48 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-06-19 15:53:48 +0400
commit9d4cc7885dce3237b98e282d79a589f288c6310c (patch)
treeddba42e16846da05589e70e84360c725f1849af0 /source/blender/editors/interface/interface_regions.c
parent15016873ab74634cf0a1cde0adab8f981ce9e117 (diff)
fix for filesel autocomplete, it had the annoying behavior if you entered in a non-existing name, of executing it and then asking to add the dir.
Diffstat (limited to 'source/blender/editors/interface/interface_regions.c')
-rw-r--r--source/blender/editors/interface/interface_regions.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c
index b764c70b111..1ff46004bdf 100644
--- a/source/blender/editors/interface/interface_regions.c
+++ b/source/blender/editors/interface/interface_regions.c
@@ -1039,18 +1039,20 @@ void ui_searchbox_update(bContext *C, ARegion *ar, uiBut *but, const bool reset)
ED_region_tag_redraw(ar);
}
-void ui_searchbox_autocomplete(bContext *C, ARegion *ar, uiBut *but, char *str)
+bool ui_searchbox_autocomplete(bContext *C, ARegion *ar, uiBut *but, char *str)
{
uiSearchboxData *data = ar->regiondata;
+ bool changed = false;
if (str[0]) {
data->items.autocpl = autocomplete_begin(str, ui_get_but_string_max_length(but));
but->search_func(C, but->search_arg, but->editstr, &data->items);
- autocomplete_end(data->items.autocpl, str);
+ changed = autocomplete_end(data->items.autocpl, str);
data->items.autocpl = NULL;
}
+ return changed;
}
static void ui_searchbox_region_draw_cb(const bContext *UNUSED(C), ARegion *ar)