correct own error r59619 (changes made to patch, adding handle recalculation which is needed after splitting).

This commit is contained in:
Campbell Barton
2013-08-29 14:52:36 +00:00
parent e98ef3ae68
commit 973e317461
2 changed files with 12 additions and 5 deletions

View File

@@ -3093,11 +3093,18 @@ void BKE_nurb_handle_calc_simple(Nurb *nu, BezTriple *bezt)
BLI_assert(ARRAY_HAS_ITEM(bezt, nu->bezt, nu->pntsu));
if (index == 0) {
prev = (nu->flag & CU_NURB_CYCLIC) ? &nu->bezt[nu->pntsu - 1] : NULL;
if (nu->pntsu > 1) {
if (index == 0) {
prev = (nu->flagu & CU_NURB_CYCLIC) ? &nu->bezt[nu->pntsu - 1] : NULL;
next = bezt + 1;
}
else if (index == nu->pntsu - 1) {
prev = bezt - 1;
next = (nu->flagu & CU_NURB_CYCLIC) ? &nu->bezt[0] : NULL;
}
}
if (index == nu->pntsu - 1) {
next = (nu->flag & CU_NURB_CYCLIC) ? &nu->bezt[0] : NULL;
else {
prev = next = NULL;
}
BKE_nurb_handle_calc(bezt, prev, next, 0);

View File

@@ -2086,7 +2086,7 @@ void TEXT_OT_overwrite_toggle(wmOperatorType *ot)
static void txt_screen_clamp(SpaceText *st, ARegion *ar)
{
if (st->top < 0) {
if (st->top <= 0) {
st->top = 0;
}
else {