Fix T80426: Crash when deleting custom orientation

Indices referencing other orientations were not being updated,
This commit is contained in:
Germano Cavalcante 2020-09-04 15:01:04 -03:00 committed by Jeroen Bakker
parent bfa485a26f
commit d745d0a7dc
Notes: blender-bot 2023-02-14 11:28:39 +01:00
Referenced by issue #80426, Crash when deleting custom orientation. And gizmo points wrong way.
Referenced by issue #77348, Blender LTS: Maintenance Task 2.83
1 changed files with 4 additions and 0 deletions

View File

@ -2230,6 +2230,10 @@ void BKE_scene_transform_orientation_remove(Scene *scene, TransformOrientation *
orient_slot->type = V3D_ORIENT_GLOBAL;
orient_slot->index_custom = -1;
}
else if (orient_slot->index_custom > orientation_index) {
BLI_assert(orient_slot->type == V3D_ORIENT_CUSTOM);
orient_slot->index_custom--;
}
}
BLI_freelinkN(&scene->transform_spaces, orientation);