Fix T72297: disabled buttons toggling on drag

Disabled buttons would incorrectly toggle state when a drag toggle
passed over them. This adds a check to prevent a drag toggle on disabled
buttons.

Differential Revision: https://developer.blender.org/D8476
This commit is contained in:
Nathan Craddock 2020-08-05 09:47:34 -06:00
parent 531a3f6c4e
commit d84dce85f3
Notes: blender-bot 2023-02-14 09:09:43 +01:00
Referenced by issue #72297, In outliner you can click on locked elements using click-drag
1 changed files with 3 additions and 0 deletions

View File

@ -1382,6 +1382,9 @@ static void ui_multibut_states_apply(bContext *C, uiHandleButtonData *data, uiBl
static bool ui_drag_toggle_but_is_supported(const uiBut *but)
{
if (but->flag & UI_BUT_DISABLED) {
return false;
}
if (ui_but_is_bool(but)) {
return true;
}