diff options
author | Julian Eisel <julian@blender.org> | 2022-06-14 12:53:38 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2022-06-14 12:56:51 +0300 |
commit | 4475c38c5c9a0e1c5bb48d6fec07cbf58d98abcd (patch) | |
tree | 7488e0393c1d7a24edde9218045274203edcb019 /source/blender/editors/interface/interface_handlers.c | |
parent | 06e07761753a19fe192cce889e5040f0bc4e61a7 (diff) |
Fix T98715: Crash drag-dropping collection from outliner to ID property
The value of disabled buttons shouldn't be changed through dropping onto
it. Check for the disabled state in the drop operator poll, so the
dragging code will change the cursor to show that dropping isn't
possible at the given cursor location.
Diffstat (limited to 'source/blender/editors/interface/interface_handlers.c')
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 5ffcdbd9668..6d2f45813fe 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -2945,6 +2945,9 @@ void ui_but_text_password_hide(char password_str[UI_MAX_PASSWORD_STR], void ui_but_set_string_interactive(bContext *C, uiBut *but, const char *value) { + /* Caller should check. */ + BLI_assert((but->flag & UI_BUT_DISABLED) == 0); + button_activate_state(C, but, BUTTON_STATE_TEXT_EDITING); ui_textedit_string_set(but, but->active, value); |