Commit: b54b14582bbd65103b5b052168dd8353e261d2ea
Author: Brecht Van Lommel
Date:   Wed Feb 13 18:56:46 2019 +0100
Branches: master
https://developer.blender.org/rBb54b14582bbd65103b5b052168dd8353e261d2ea

Fix T61505, T61280, bugs in button drag toggle after recent changes.

===================================================================

M       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)) {

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to