Fix #138180: VSE zoom left-aligned for old files
Patch #137802 made VSE zoom levels constant when resizing the area,
choosing to also align the V2D to the left when horizontally resizing.
This had the added side-effect of causing zooming to be left-aligned. The
fix was attempted in #138041 (and subsequent commit 385a8a4d6a).
However, the versioning code to add the fix (`V2D_ZOOM_IGNORE_KEEPOFS` flag)
was included in the original versioning block instead of a new one. This
meant that newly saved files during the bug did not get the fix applied.
Fix by moving that flag application to a new versioning block.
Pull Request: https://projects.blender.org/blender/blender/pulls/138424
This commit is contained in:
committed by
John Kiril Swenson
parent
69610383b9
commit
28b1a33e16
@@ -27,7 +27,7 @@
|
||||
|
||||
/* Blender file format version. */
|
||||
#define BLENDER_FILE_VERSION BLENDER_VERSION
|
||||
#define BLENDER_FILE_SUBVERSION 64
|
||||
#define BLENDER_FILE_SUBVERSION 65
|
||||
|
||||
/* Minimum Blender version that supports reading file written with the current
|
||||
* version. Older Blender versions will test this and cancel loading the file, showing a warning to
|
||||
|
||||
@@ -10385,7 +10385,6 @@ void blo_do_versions_400(FileData *fd, Library * /*lib*/, Main *bmain)
|
||||
if (region->regiontype == RGN_TYPE_WINDOW) {
|
||||
region->v2d.keepzoom |= V2D_KEEPZOOM;
|
||||
region->v2d.keepofs |= V2D_KEEPOFS_X | V2D_KEEPOFS_Y;
|
||||
region->v2d.flag |= V2D_ZOOM_IGNORE_KEEPOFS;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10616,6 +10615,24 @@ void blo_do_versions_400(FileData *fd, Library * /*lib*/, Main *bmain)
|
||||
FOREACH_NODETREE_END;
|
||||
}
|
||||
|
||||
if (!MAIN_VERSION_FILE_ATLEAST(bmain, 405, 65)) {
|
||||
LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) {
|
||||
LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) {
|
||||
LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) {
|
||||
if (sl->spacetype == SPACE_SEQ) {
|
||||
ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
|
||||
&sl->regionbase;
|
||||
LISTBASE_FOREACH (ARegion *, region, regionbase) {
|
||||
if (region->regiontype == RGN_TYPE_WINDOW) {
|
||||
region->v2d.flag |= V2D_ZOOM_IGNORE_KEEPOFS;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Always run this versioning (keep at the bottom of the function). Meshes are written with the
|
||||
* legacy format which always needs to be converted to the new format on file load. To be moved
|
||||
* to a subversion check in 5.0. */
|
||||
|
||||
Reference in New Issue
Block a user