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
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2010-01-27 18:30:20 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-01-27 18:30:20 +0300
commit39fa9ecd1a4f1d7433a079cfcc6170a4a8d75451 (patch)
treebe9cf63942b5ae8f8a989722ecc4f28fd1cf4b79 /source/blender/blenloader
parent035daa2e2d4be8209ef6afa2613bccd57c7cbe17 (diff)
Fix #20651: 3D Cursor resets after add object operator redo. The 3d cursor
is not getting an undo push, so also made it preserved now through undo's, this is like e.g. the 3d view position which also stays the same.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index aab8f9f2b1b..c3457adc288 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -4823,11 +4823,15 @@ void lib_link_screen_restore(Main *newmain, bScreen *curscreen, Scene *curscene)
for(sc= newmain->screen.first; sc; sc= sc->id.next) {
-
+ Scene *oldscene= sc->scene;
+
sc->scene= restore_pointer_by_name(newmain, (ID *)sc->scene, 1);
if(sc->scene==NULL)
sc->scene= curscene;
+ /* keep cursor location through undo */
+ copy_v3_v3(sc->scene->cursor, oldscene->cursor);
+
sa= sc->areabase.first;
while(sa) {
SpaceLink *sl;