From 381df0564144dee310f37a10252b8396175352fa Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 9 Jul 2013 11:31:49 +0000 Subject: [PATCH] Fix #36030: datablock drag and drop to buttons not working with a certain number of objects in the scene. --- source/blender/editors/interface/interface_handlers.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 342c0569f41..8782076798e 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -1297,9 +1297,14 @@ static void ui_but_drop(bContext *C, const wmEvent *event, uiBut *but, uiHandleB if (ELEM3(but->type, TEX, SEARCH_MENU, SEARCH_MENU_UNLINK)) { ID *id = (ID *)wmd->poin; - if (but->poin == NULL && but->rnapoin.data == NULL) {} button_activate_state(C, but, BUTTON_STATE_TEXT_EDITING); BLI_strncpy(data->str, id->name + 2, data->maxlen); + + if (ELEM(but->type, SEARCH_MENU, SEARCH_MENU_UNLINK)) { + but->changed = true; + ui_searchbox_update(C, data->searchbox, but, true); + } + button_activate_state(C, but, BUTTON_STATE_EXIT); } } @@ -1420,6 +1425,7 @@ static void ui_but_copy_paste(bContext *C, uiBut *but, uiHandleButtonData *data, if (ELEM(but->type, SEARCH_MENU, SEARCH_MENU_UNLINK)) { /* else uiSearchboxData.active member is not updated [#26856] */ + but->changed = true; ui_searchbox_update(C, data->searchbox, but, true); } button_activate_state(C, but, BUTTON_STATE_EXIT);