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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user