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:
authorBastien Montagne <montagne29@wanadoo.fr>2014-08-10 00:04:55 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2014-08-10 00:04:55 +0400
commit64c7b2a122d6099efa8f298866b37239a18bb9bf (patch)
tree7d4a009c7c58c1838ee91170b2ef5e54ba2f643b /source/blender/editors/interface/interface_handlers.c
parent71323f042565dd73ed5a45a5d00e984fa0a164b8 (diff)
UI: show ttips even if disabled, when holding alt key.
Patch by @sambler (Shane Ambler), with minor edits by myself (see also D727, T24055). Reviewed feature-side by @carter2422 (Jonathan Williamson).
Diffstat (limited to 'source/blender/editors/interface/interface_handlers.c')
-rw-r--r--source/blender/editors/interface/interface_handlers.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 1cf704ec6de..68148d30136 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -6656,7 +6656,7 @@ static void button_tooltip_timer_reset(bContext *C, uiBut *but)
data->tooltiptimer = NULL;
}
- if (U.flag & USER_TOOLTIPS)
+ if ((U.flag & USER_TOOLTIPS) || (but->flag & UI_OPTION_TOOLTIPS))
if (!but->block->tooltipdisabled)
if (!wm->drags.first)
data->tooltiptimer = WM_event_add_timer(data->wm, data->window, TIMER, BUTTON_TOOLTIP_DELAY);
@@ -7168,6 +7168,11 @@ static int ui_handle_button_over(bContext *C, const wmEvent *event, ARegion *ar)
if (event->type == MOUSEMOVE) {
but = ui_but_find_mouse_over(ar, event);
if (but) {
+ if (event->alt)
+ /* display tooltips if holding alt on mouseover when tooltips are off in prefs */
+ but->flag |= UI_OPTION_TOOLTIPS;
+ else
+ but->flag &= ~UI_OPTION_TOOLTIPS;
button_activate_init(C, ar, but, BUTTON_ACTIVATE_OVER);
}
}