diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-08-25 08:03:38 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-08-25 08:03:38 +0400 |
commit | b54d16858f54452361921629a150b5115235c5fa (patch) | |
tree | 8fa8b0a6140ec2fbb9da23fc93023a28dcac624b /source/blender/windowmanager | |
parent | 8ffc50e45cc04f69c03dbdda9b331328ec840121 (diff) |
bugfix [#23456] context.main.filepath lost after undo
G.sce was being restored after undo but not G.main->name
also changed reading a new file so G.main->name gets set to the startup.blend even if its not on the disk, not ideal but would set to <memory2> otherwise.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/intern/wm_files.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index e2293f79e95..5960ef431d3 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -334,6 +334,9 @@ void WM_read_file(bContext *C, char *name, ReportList *reports) /* called on startup, (context entirely filled with NULLs) */ /* or called for 'New File' */ /* op can be NULL */ +/* note: G.sce is used to store the last saved path so backup and restore after loading + * G.main->name is similar to G.sce but when loading from memory set the name to startup.blend + * ...this could be changed but seems better then setting to "" */ int WM_read_homefile(bContext *C, wmOperator *op) { ListBase wmbase; @@ -376,7 +379,8 @@ int WM_read_homefile(bContext *C, wmOperator *op) WM_check(C); /* opens window(s), checks keymaps */ strcpy(G.sce, scestr); /* restore */ - + strcpy(G.main->name, tstr); /* this is wrong when loading from memory but better then leaving as-is */ + wm_init_userdef(C); /* When loading factory settings, the reset solid OpenGL lights need to be applied. */ |