diff options
author | Ton Roosendaal <ton@blender.org> | 2013-01-06 22:28:39 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2013-01-06 22:28:39 +0400 |
commit | bbd95fafefa88390a9bb3fef3664719cf8539d85 (patch) | |
tree | bc7063c4bda719c6d7ee69d2ec9f9cc570ccde4e | |
parent | 69dd1b08195b53a141cc984947ee30256bbd8303 (diff) |
Three fixes:
- Old issue: on scrolling button views, tooltips could open or stayed open.
- New fix: alt+swipe now changes button values again
- Removed test print, from WIP code project.
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 32 | ||||
-rw-r--r-- | source/blender/editors/render/render_preview.c | 3 |
2 files changed, 18 insertions, 17 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 1c9cd92271c..e92cfae07b0 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -238,6 +238,7 @@ void ui_pan_to_scroll(wmEvent *event, int *type, int *val) *type = WHEELUPMOUSE; else *type = WHEELDOWNMOUSE; + lastdy = 0; } } @@ -2717,7 +2718,9 @@ static int ui_do_but_NUM(bContext *C, uiBlock *block, uiBut *but, uiHandleButton ui_pan_to_scroll(event, &type, &val); /* XXX hardcoded keymap check.... */ - if (type == WHEELDOWNMOUSE && event->alt) { + if (type == MOUSEPAN && event->alt) + retval = WM_UI_HANDLER_BREAK; /* allow accumulating values, otherwise scrolling gets preference */ + else if (type == WHEELDOWNMOUSE && event->alt) { mx = but->rect.xmin; click = 1; } @@ -2945,7 +2948,9 @@ static int ui_do_but_SLI(bContext *C, uiBlock *block, uiBut *but, uiHandleButton ui_pan_to_scroll(event, &type, &val); /* XXX hardcoded keymap check.... */ - if (type == WHEELDOWNMOUSE && event->alt) { + if (type == MOUSEPAN && event->alt) + retval = WM_UI_HANDLER_BREAK; /* allow accumulating values, otherwise scrolling gets preference */ + else if (type == WHEELDOWNMOUSE && event->alt) { mx = but->rect.xmin; click = 2; } @@ -6010,19 +6015,18 @@ static int ui_handle_button_event(bContext *C, wmEvent *event, uiBut *but) retval = WM_UI_HANDLER_CONTINUE; break; - case WHEELUPMOUSE: - case WHEELDOWNMOUSE: - case MIDDLEMOUSE: - /* XXX hardcoded keymap check... but anyway, while view changes, tooltips should be removed */ - if (data->tooltiptimer) { - WM_event_remove_timer(data->wm, data->window, data->tooltiptimer); - data->tooltiptimer = NULL; - } - /* pass on purposedly */ - default: - /* handle button type specific events */ - retval = ui_do_button(C, block, but, event); } + /* XXX hardcoded keymap check... but anyway, while view changes, tooltips should be removed */ + case WHEELUPMOUSE: + case WHEELDOWNMOUSE: + case MIDDLEMOUSE: + case MOUSEPAN: + button_timers_tooltip_remove(C, but); + + /* pass on purposedly */ + default: + /* handle button type specific events */ + retval = ui_do_button(C, block, but, event); } } else if (data->state == BUTTON_STATE_WAIT_RELEASE) { diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c index 10cb5620808..2b714daecf8 100644 --- a/source/blender/editors/render/render_preview.c +++ b/source/blender/editors/render/render_preview.c @@ -886,8 +886,6 @@ static void icon_preview_startjob(void *customdata, short *stop, short *do_updat ShaderPreview *sp = customdata; ID *id = sp->id; short idtype = GS(id->name); - - printf("icon start job %s\n", id->name); if (idtype == ID_IM) { Image *ima = (Image *)id; @@ -1012,7 +1010,6 @@ static void icon_preview_endjob(void *customdata) IconPreview *ip = customdata; if (ip->id) { - printf("icon end job %s\n", ip->id->name); if (GS(ip->id->name) == ID_BR) WM_main_add_notifier(NC_BRUSH | NA_EDITED, ip->id); |