Fix #27900: file browser filter, sort, .. parameters were not saved. This is
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Fri, 8 Jul 2011 12:22:48 +0000 (12:22 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Fri, 8 Jul 2011 12:22:48 +0000 (12:22 +0000)
useful if you have a screen setup with a file browser editor.

source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/writefile.c

index 2637e114fbc891a242d047cef46064b2d0201b68..2402106306e9c3bf5ecffcd610c4a110689f66c3 100644 (file)
@@ -4836,7 +4836,6 @@ static void lib_link_screen(FileData *fd, Main *main)
                                        else if(sl->spacetype==SPACE_FILE) {
                                                SpaceFile *sfile= (SpaceFile *)sl;
                                                sfile->files= NULL;
                                        else if(sl->spacetype==SPACE_FILE) {
                                                SpaceFile *sfile= (SpaceFile *)sl;
                                                sfile->files= NULL;
-                                               sfile->params= NULL;
                                                sfile->op= NULL;
                                                sfile->layout= NULL;
                                                sfile->folders_prev= NULL;
                                                sfile->op= NULL;
                                                sfile->layout= NULL;
                                                sfile->folders_prev= NULL;
@@ -5449,7 +5448,7 @@ static void direct_link_screen(FileData *fd, bScreen *sc)
                                sfile->files= NULL;
                                sfile->layout= NULL;
                                sfile->op= NULL;
                                sfile->files= NULL;
                                sfile->layout= NULL;
                                sfile->op= NULL;
-                               sfile->params= NULL;
+                               sfile->params= newdataadr(fd, sfile->params);
                        }
                }
                
                        }
                }
                
index d5192eaf09c3e27d6f309e99e9d98a037ad9ef55..ba4395ace9cb6c90cdd1f1c2aa33e8b37f931d90 100644 (file)
@@ -2103,7 +2103,11 @@ static void write_screens(WriteData *wd, ListBase *scrbase)
                                        writestruct(wd, DATA, "SpaceButs", 1, sl);
                                }
                                else if(sl->spacetype==SPACE_FILE) {
                                        writestruct(wd, DATA, "SpaceButs", 1, sl);
                                }
                                else if(sl->spacetype==SPACE_FILE) {
+                                       SpaceFile *sfile= (SpaceFile *)sl;
+
                                        writestruct(wd, DATA, "SpaceFile", 1, sl);
                                        writestruct(wd, DATA, "SpaceFile", 1, sl);
+                                       if(sfile->params)
+                                               writestruct(wd, DATA, "FileSelectParams", 1, sfile->params);
                                }
                                else if(sl->spacetype==SPACE_SEQ) {
                                        writestruct(wd, DATA, "SpaceSeq", 1, sl);
                                }
                                else if(sl->spacetype==SPACE_SEQ) {
                                        writestruct(wd, DATA, "SpaceSeq", 1, sl);