Fix T37281: View3D could have invalid transform orientation using undo
This commit is contained in:
parent
283f43d31a
commit
d44c79b7c9
@ -5936,6 +5936,14 @@ void blo_lib_link_screen_restore(Main *newmain, bScreen *curscreen, Scene *cursc
|
||||
/* not very nice, but could help */
|
||||
if ((v3d->layact & v3d->lay) == 0) v3d->layact = v3d->lay;
|
||||
|
||||
/* its possible the current transform orientation has been removed */
|
||||
if (v3d->twmode >= V3D_MANIP_CUSTOM) {
|
||||
const int selected_index = (v3d->twmode - V3D_MANIP_CUSTOM);
|
||||
if (!BLI_findlink(&sc->scene->transform_spaces, selected_index)) {
|
||||
v3d->twmode = V3D_MANIP_GLOBAL;
|
||||
}
|
||||
}
|
||||
|
||||
/* free render engines for now */
|
||||
for (ar = sa->regionbase.first; ar; ar = ar->next) {
|
||||
RegionView3D *rv3d= ar->regiondata;
|
||||
|
Loading…
Reference in New Issue
Block a user