Proper code for bugfix revision 12365 (which was uncommitted today).

Old log Message:
-----------
bug fix, when opening blender with a file (by double clicking or from the 
command line) - the initial undo state would be set to the default scene.
So holding Ctrl+Z would go back to the default .B.blend rather then the 
file that the user opened.
This commit is contained in:
Ton Roosendaal
2007-11-11 16:13:27 +00:00
parent 3a90b35db8
commit 3d250856fb

View File

@@ -688,6 +688,10 @@ int main(int argc, char **argv)
else {
BKE_read_file(argv[a], NULL);
sound_initialize_sounds();
/* happens for the UI on file reading too */
BKE_reset_undo();
BKE_write_undo("original"); /* save current state */
}
}