Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2013-03-13 18:19:53 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2013-03-13 18:19:53 +0400
commit4e86946c2b7d9334aa6bad3c1f4f0844b0c2a76a (patch)
tree685073787e557180a22bcfec4681248df36080b4 /source/blender
parent020656ceba4c76218e8028cca294052cd68f5ac5 (diff)
Fix wrong use of enum in UI code to reactive button on mouse over, this worked
only by accident.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/interface/interface_handlers.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index c2cd96d4ec5..abbc9d4a3d6 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -6302,7 +6302,7 @@ static void ui_handle_button_activate(bContext *C, ARegion *ar, uiBut *but, uiBu
static int ui_handle_button_event(bContext *C, const wmEvent *event, uiBut *but)
{
uiHandleButtonData *data = but->active;
- const uiButtonActivateType state_orig = data->state;
+ const uiHandleButtonState state_orig = data->state;
uiBlock *block;
ARegion *ar;
int retval;
@@ -6474,9 +6474,9 @@ static int ui_handle_button_event(bContext *C, const wmEvent *event, uiBut *but)
* This is needed to make sure if a button was active,
* it stays active while the mouse is over it.
* This avoids adding mousemoves, see: [#33466] */
- if (ELEM(state_orig, BUTTON_ACTIVATE, BUTTON_ACTIVATE_OVER)) {
+ if (ELEM(state_orig, BUTTON_STATE_INIT, BUTTON_STATE_HIGHLIGHT)) {
if (ui_but_find_mouse_over(ar, event->x, event->y) == but) {
- button_activate_init(C, ar, but, state_orig);
+ button_activate_init(C, ar, but, BUTTON_ACTIVATE_OVER);
}
}
}