From b54b14582bbd65103b5b052168dd8353e261d2ea Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 13 Feb 2019 18:56:46 +0100 Subject: Fix T61505, T61280, bugs in button drag toggle after recent changes. --- source/blender/editors/interface/interface_handlers.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/interface/interface_handlers.c') diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 92dac3f0257..672458e1db2 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -1241,9 +1241,10 @@ static bool ui_drag_toggle_but_is_supported(const uiBut *but) * then just true or false for toggle buttons with more than 2 states. */ static int ui_drag_toggle_but_pushed_state(uiBut *but) { - if (but->icon) { + if (but->rnapoin.data == NULL && but->poin == NULL && but->icon) { /* Assume icon identifies a unique state, for buttons that - * work though functions callbacks. */ + * work though functions callbacks and don't have an boolean + * value that indicates the state. */ return but->icon + but->iconadd; } else if (ui_but_is_bool(but)) { -- cgit v1.2.3