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:
authorSergey Sharybin <sergey.vfx@gmail.com>2012-08-26 20:41:03 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-08-26 20:41:03 +0400
commit7b84a75a2232c2fd810b584539110046b6a4f518 (patch)
tree75e9ab3c66adbe2709df3d7a5ff8ffaa69256972 /source
parentd35957ba9493dfdcc83440a968d6ceb3fcfdc645 (diff)
Fix zooming in/out preview in sequencer
It was a regression since disabling Y-axis zooming in sequencer. Now check region type and allow all kind of zooming for preview region.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/interface/view2d_ops.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c
index cc2ca5c5475..5b19bb2d3c9 100644
--- a/source/blender/editors/interface/view2d_ops.c
+++ b/source/blender/editors/interface/view2d_ops.c
@@ -682,7 +682,10 @@ static int view_zoomin_exec(bContext *C, wmOperator *op)
/* default not to zoom the sequencer vertically */
if (sa && sa->spacetype == SPACE_SEQ) {
- do_zoom_y = FALSE;
+ ARegion *ar = CTX_wm_region(C);
+
+ if (ar && ar->regiontype != RGN_TYPE_PREVIEW)
+ do_zoom_y = FALSE;
}
/* set RNA-Props - zooming in by uniform factor */
@@ -727,7 +730,7 @@ static void VIEW2D_OT_zoom_in(wmOperatorType *ot)
/* api callbacks */
ot->invoke = view_zoomin_invoke;
-// ot->exec = view_zoomin_exec; // XXX, needs view_zoomdrag_init called first.
+ ot->exec = view_zoomin_exec; // XXX, needs view_zoomdrag_init called first.
ot->poll = view_zoom_poll;
/* rna - must keep these in sync with the other operators */
@@ -748,7 +751,10 @@ static int view_zoomout_exec(bContext *C, wmOperator *op)
/* default not to zoom the sequencer vertically */
if (sa && sa->spacetype == SPACE_SEQ) {
- do_zoom_y = FALSE;
+ ARegion *ar = CTX_wm_region(C);
+
+ if (ar && ar->regiontype != RGN_TYPE_PREVIEW)
+ do_zoom_y = FALSE;
}
/* set RNA-Props - zooming in by uniform factor */