From 92182495da881d54310bc6dd53afb91daf00116f Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Fri, 1 Mar 2019 13:14:16 -0300 Subject: Fix T62016: Outliner visibility icons drag behaviour broken We are mixing bool and fancy 3-in-1 func-set buttons in the outliner. So they would return different pushed state in ui_drag_toggle_but_pushed_state(). We now have a callback function that allows the button to set its own pushed_button_state callback function. Note: This is a bit of overkill since we are planning to change the 3-in-1 outliner buttons. That said, it may be nice to have, since in the future we can mix those buttons for other things. Reviewers: brecht Differential Revision: https://developer.blender.org/D4434 --- source/blender/editors/interface/interface_intern.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/editors/interface/interface_intern.h') diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h index 19390a634fa..82d6115fbbb 100644 --- a/source/blender/editors/interface/interface_intern.h +++ b/source/blender/editors/interface/interface_intern.h @@ -320,6 +320,9 @@ struct uiBut { void *editcoba; void *editcumap; + uiButPushedStateFunc pushed_state_func; + void *pushed_state_arg; + /* pointer back */ uiBlock *block; }; -- cgit v1.2.3