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:
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenloader/intern/readfile.c27
1 files changed, 26 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 08f9b655fac..f669b178252 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -11591,7 +11591,32 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
/* put compatibility code here until next subversion bump */
{
-
+ ARegion *ar;
+ /* screen view2d settings were not properly initialized [#27164] */
+ bScreen *screen;
+ for(screen= main->screen.first; screen; screen= screen->id.next) {
+ ScrArea *sa;
+ /* add regions */
+ for(sa= screen->areabase.first; sa; sa= sa->next) {
+ SpaceLink *sl;
+ for (sl= sa->spacedata.first; sl; sl= sl->next) {
+ if(sl->spacetype==SPACE_IMAGE) {
+ for (ar=sa->regionbase.first; ar; ar= ar->next) {
+ if(ar->regiontype == RGN_TYPE_WINDOW) {
+ View2D *v2d= &ar->v2d;
+ v2d->minzoom= 0;
+ v2d->maxzoom= 0;
+ v2d->scroll= 0; /* cause of bug, but set others just incase */
+ v2d->keeptot= 0;
+ v2d->keepzoom= 0;
+ v2d->keepofs= 0;
+ v2d->align= 0;
+ }
+ }
+ }
+ }
+ }
+ }
}
/* WATCH IT!!!: pointers from libdata have not been converted yet here! */