diff options
author | Ton Roosendaal <ton@blender.org> | 2008-12-03 16:14:01 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2008-12-03 16:14:01 +0300 |
commit | d8ed4c389c750f0513a7024fa5dadeb28c05749b (patch) | |
tree | b84d16e983691c3b95b1bf01ee6264a986eeddf9 /source/blender/editors/space_time/time_ops.c | |
parent | 92cbb4b033ee236aafefbf22b2e2adfb363d36b1 (diff) |
2.5 fixes
- View2d bug: it was taking sliders into account for setting the
window matrix, which it shouldn't (glViewport does). This caused
error offset in drawing, like for current-frame scrolling.
- Current frame scrolling in TimeWindow back on window level.
(used to crash, but that was fixed in WM)
- Made UI_view2d_region_to_view accept ints, no shorts
- removed debug function in interface_ops.c
Diffstat (limited to 'source/blender/editors/space_time/time_ops.c')
-rw-r--r-- | source/blender/editors/space_time/time_ops.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/space_time/time_ops.c b/source/blender/editors/space_time/time_ops.c index 27e89422f98..657cf30e17e 100644 --- a/source/blender/editors/space_time/time_ops.c +++ b/source/blender/editors/space_time/time_ops.c @@ -27,6 +27,7 @@ */ #include <stdlib.h> +#include <math.h> #include "MEM_guardedalloc.h" @@ -107,7 +108,6 @@ static int change_frame_exec(bContext *C, wmOperator *op) static int frame_from_event(bContext *C, wmEvent *event) { - SpaceTime *stime= C->area->spacedata.first; ARegion *region= C->region; int x, y; float viewx; @@ -116,7 +116,7 @@ static int frame_from_event(bContext *C, wmEvent *event) y= event->y - region->winrct.ymin; UI_view2d_region_to_view(®ion->v2d, x, y, &viewx, NULL); - return (int)(viewx+0.5f); + return (int)floor(viewx+0.5f); } static int change_frame_invoke(bContext *C, wmOperator *op, wmEvent *event) @@ -126,7 +126,7 @@ static int change_frame_invoke(bContext *C, wmOperator *op, wmEvent *event) change_frame_apply(C, op); /* add temp handler */ - WM_event_add_modal_handler(C, &C->region->handlers, op);// XXX should be for window, but we crash otherwise + WM_event_add_modal_handler(C, &C->window->handlers, op); return OPERATOR_RUNNING_MODAL; } |