diff options
author | Julian Eisel <julian@blender.org> | 2022-03-17 19:45:29 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2022-03-17 19:52:50 +0300 |
commit | 7fed4c06c2ff45d9ab4f809d542b6e1ee8f76488 (patch) | |
tree | 131ea0f54eb57b52cc17b075f1d8b9966801152c /source/blender/editors/interface/interface_layout.c | |
parent | 17906794f555fb8452d677d7db576e78b7a115a6 (diff) |
Fix keying-set selector broken
The menu for Timeline > Keying > Active Keying Set wouldn't show up.
Caused by d8e3bcf770c2. The function to attach search menu data to the button
would be called twice with different arguments for the same button now.
Shouldn't be an issue in general, but the first call now had the unexpected
side effect that the button would get disabled. Make sure it's re-enabled when
the second call sets the proper search data now.
Diffstat (limited to 'source/blender/editors/interface/interface_layout.c')
-rw-r--r-- | source/blender/editors/interface/interface_layout.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index 17f0ae1f2d4..cbc21bd481f 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -2751,6 +2751,10 @@ uiBut *ui_but_add_search( ui_rna_collection_search_arg_free_fn, NULL, NULL); + /* If this is called multiple times for the same button, an earlier call may have taken the + * else branch below so the button was disabled. Now we have a searchprop, so it can be enabled + * again. */ + but->flag &= ~UI_BUT_DISABLED; } else if (but->type == UI_BTYPE_SEARCH_MENU) { /* In case we fail to find proper searchprop, |