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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-02-06 15:44:37 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-02-06 15:44:37 +0300
commit274e4bd9e0bb0c7a50c5d381d7a579a04670cb58 (patch)
tree16aa3dc00e2c0060f136fae548af73603a5a1bd0 /source
parentb28033d53f9f876cc2132cfe9dc46ef1c204b063 (diff)
commit from joe 26206, removed timer from zoom. this is needed for continuous zoom.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/space_view3d/view3d_edit.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index bd7b2d3c5b8..1658e0288fb 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -1076,7 +1076,11 @@ static int viewzoom_modal(bContext *C, wmOperator *op, wmEvent *event)
short event_code= VIEW_PASS;
/* execute the events */
- if(event->type==MOUSEMOVE) {
+ if (event->type == TIMER && event->customdata == vod->timer) {
+ /* continuous zoom */
+ event_code= VIEW_APPLY;
+ }
+ else if(event->type==MOUSEMOVE) {
event_code= VIEW_APPLY;
}
else if(event->type==EVT_MODAL_MAP) {
@@ -1194,6 +1198,12 @@ static int viewzoom_invoke(bContext *C, wmOperator *op, wmEvent *event)
return OPERATOR_FINISHED;
}
else {
+ if(U.viewzoom == USER_ZOOM_CONT) {
+ /* needs a timer to continue redrawing */
+ vod->timer= WM_event_add_timer(CTX_wm_manager(C), CTX_wm_window(C), TIMER, 0.01f);
+ vod->timer_lastdraw= PIL_check_seconds_timer();
+ }
+
/* add temp handler */
WM_event_add_modal_handler(C, op);