2 minor glitches

- removing bone groups didnt set the next one active.
- removing poselib was using int for enum rna property.
This commit is contained in:
Campbell Barton 2011-05-18 08:16:33 +00:00
parent 7e6520c080
commit 2fe3840780
2 changed files with 5 additions and 2 deletions

@ -831,7 +831,10 @@ void pose_remove_group (Object *ob)
/* now, remove it from the pose */
BLI_freelinkN(&pose->agroups, grp);
pose->active_group= 0;
pose->active_group--;
if(pose->active_group < 0 || pose->agroups.first == NULL) {
pose->active_group= 0;
}
}
}

@ -527,7 +527,7 @@ static int poselib_remove_exec (bContext *C, wmOperator *op)
}
/* get index (and pointer) of pose to remove */
marker= BLI_findlink(&act->markers, RNA_int_get(op->ptr, "pose"));
marker= BLI_findlink(&act->markers, RNA_enum_get(op->ptr, "pose"));
if (marker == NULL) {
BKE_reportf(op->reports, RPT_ERROR, "Invalid Pose specified %d", RNA_int_get(op->ptr, "pose"));
return OPERATOR_CANCELLED;