Fix recent vert-slide UV's when cancelled

Added support recently, but wasn't cancelling correctly.
This commit is contained in:
Campbell Barton
2015-02-11 07:22:19 +11:00
parent 2b01b71339
commit 1d64dff671
2 changed files with 11 additions and 1 deletions

View File

@@ -2342,8 +2342,12 @@ int transformEnd(bContext *C, TransInfo *t)
/* handle restoring objects */
if (t->state == TRANS_CANCEL) {
/* exception, edge slide transformed UVs too */
if (t->mode == TFM_EDGE_SLIDE)
if (t->mode == TFM_EDGE_SLIDE) {
doEdgeSlide(t, 0.0f);
}
else if (t->mode == TFM_VERT_SLIDE) {
doVertSlide(t, 0.0f);
}
exit_code = OPERATOR_CANCELLED;
restoreTransObjects(t); // calls recalcData()

View File

@@ -5615,6 +5615,12 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
sld->perc = 0.0;
projectEdgeSlideData(t, false);
}
else if (t->mode == TFM_VERT_SLIDE) {
VertSlideData *sld = t->customData;
sld->perc = 0.0;
projectVertSlideData(t, false);
}
}
}
}