Fix (unreported) Separate bones creates empty armature

Fix for fix (rB8bf7ca9fe31c).
The fix was not actually working [neither for multi-armature-editing as
intended nor for single armatures] and it broke single-armature bone
separation completely.

More or less indentation issue, move relevant code out of bone loop, do
after all bones have been checked, guess this was intended anyways.

Differential Revision: https://developer.blender.org/D6949
This commit is contained in:
Philipp Oeser 2020-02-27 15:47:32 +01:00
parent 4c83e6bac0
commit 498397f7bd
Notes: blender-bot 2023-02-14 10:18:56 +01:00
Referenced by issue #74274, Blender 2.82a proposed revisions
1 changed files with 7 additions and 7 deletions

View File

@ -639,14 +639,14 @@ static int separate_armature_exec(bContext *C, wmOperator *op)
has_selected_any = true;
}
}
if (has_selected_bone == false) {
if (has_selected_any) {
/* Without this, we may leave head/tail selected
* which isn't expected after separating. */
ED_armature_edit_deselect_all(ob_old);
}
continue;
}
if (has_selected_bone == false) {
if (has_selected_any) {
/* Without this, we may leave head/tail selected
* which isn't expected after separating. */
ED_armature_edit_deselect_all(ob_old);
}
continue;
}
}