Fix T47691: Missing redraw w/ pop-up dialogs
Search buttons would overwrite existing callbacks, even when they weren't needed. Causing missing updates for search buttons in pop-ups.
This commit is contained in:
parent
431a5b623e
commit
19ec1bfa89
Notes:
blender-bot
2023-02-14 19:49:51 +01:00
Referenced by issue blender/blender-addons#47691, Redrawing dialogs/popups with ID properties
|
@ -4335,7 +4335,15 @@ void UI_but_func_search_set(
|
|||
but->search_func = search_func;
|
||||
but->search_arg = arg;
|
||||
|
||||
UI_but_func_set(but, bfunc, arg, active);
|
||||
if (bfunc) {
|
||||
#ifdef DEBUG
|
||||
if (but->func) {
|
||||
/* watch this, can be cause of much confusion, see: T47691 */
|
||||
printf("%s: warning, overwriting button callback with search function callback!\n", __func__);
|
||||
}
|
||||
#endif
|
||||
UI_but_func_set(but, bfunc, arg, active);
|
||||
}
|
||||
|
||||
/* search buttons show red-alert if item doesn't exist, not for menus */
|
||||
if (0 == (but->block->flag & UI_BLOCK_LOOP)) {
|
||||
|
|
Loading…
Reference in New Issue