diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2015-02-26 16:26:42 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2015-02-26 16:27:33 +0300 |
commit | 13c275ce8477c94d53b3799c28b48011b59db2fb (patch) | |
tree | 3007548c25dcb00faebb64b91c96d93ddc35440c /source | |
parent | 60679a171d8b14705f54c32873df87e5ed911b0a (diff) |
Fix T42506 sequencer not limiting zoom.
Fix by Campbell thanks!
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/BKE_blender.h | 2 | ||||
-rw-r--r-- | source/blender/blenloader/intern/versioning_270.c | 24 | ||||
-rw-r--r-- | source/blender/editors/space_sequencer/space_sequencer.c | 2 |
3 files changed, 26 insertions, 2 deletions
diff --git a/source/blender/blenkernel/BKE_blender.h b/source/blender/blenkernel/BKE_blender.h index 34d34e92447..63cc9213b2e 100644 --- a/source/blender/blenkernel/BKE_blender.h +++ b/source/blender/blenkernel/BKE_blender.h @@ -42,7 +42,7 @@ extern "C" { * and keep comment above the defines. * Use STRINGIFY() rather than defining with quotes */ #define BLENDER_VERSION 273 -#define BLENDER_SUBVERSION 8 +#define BLENDER_SUBVERSION 9 /* 262 was the last editmesh release but it has compatibility code for bmesh data */ #define BLENDER_MINVERSION 270 #define BLENDER_MINSUBVERSION 5 diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c index f4591e4d107..089ee158570 100644 --- a/source/blender/blenloader/intern/versioning_270.c +++ b/source/blender/blenloader/intern/versioning_270.c @@ -629,4 +629,28 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main) } } } + + if (!MAIN_VERSION_ATLEAST(main, 273, 9)) { + bScreen *scr; + ScrArea *sa; + SpaceLink *sl; + ARegion *ar; + + /* Make sure sequencer preview area limits zoom */ + for (scr = main->screen.first; scr; scr = scr->id.next) { + for (sa = scr->areabase.first; sa; sa = sa->next) { + for (sl = sa->spacedata.first; sl; sl = sl->next) { + if (sl->spacetype == SPACE_SEQ) { + for (ar = sl->regionbase.first; ar; ar = ar->next) { + if (ar->regiontype == RGN_TYPE_PREVIEW) { + ar->v2d.keepzoom |= V2D_LIMITZOOM; + break; + } + } + } + } + } + } + } + } diff --git a/source/blender/editors/space_sequencer/space_sequencer.c b/source/blender/editors/space_sequencer/space_sequencer.c index 7be356dd2ec..8934628ee2c 100644 --- a/source/blender/editors/space_sequencer/space_sequencer.c +++ b/source/blender/editors/space_sequencer/space_sequencer.c @@ -144,7 +144,7 @@ static SpaceLink *sequencer_new(const bContext *C) ar->alignment = RGN_ALIGN_TOP; ar->flag |= RGN_FLAG_HIDDEN; /* for now, aspect ratio should be maintained, and zoom is clamped within sane default limits */ - ar->v2d.keepzoom = V2D_KEEPASPECT | V2D_KEEPZOOM; + ar->v2d.keepzoom = V2D_KEEPASPECT | V2D_KEEPZOOM | V2D_LIMITZOOM; ar->v2d.minzoom = 0.00001f; ar->v2d.maxzoom = 100000.0f; ar->v2d.tot.xmin = -960.0f; /* 1920 width centered */ |