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.
This commit is contained in:
Sergey Sharybin 2012-08-26 16:41:03 +00:00
parent d35957ba94
commit 7b84a75a22
1 changed files with 9 additions and 3 deletions

View File

@ -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 */