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.
This commit is contained in:
Brecht Van Lommel
2010-01-27 15:30:20 +00:00
parent 035daa2e2d
commit 39fa9ecd1a

View File

@@ -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;