diff options
author | Martin Poirier <theeth@yahoo.com> | 2010-11-20 21:46:36 +0300 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2010-11-20 21:46:36 +0300 |
commit | 6eaf0ac8be90442083af73cc53bdbee75db4a179 (patch) | |
tree | 467f31157d0b86f25c99ecd889fe584257ae6702 /source/blender/editors/transform/transform.c | |
parent | 4f3d80e70608a1d308e96cd278ba619edb569e31 (diff) |
Cancel edge slide on invalid selection.
Patch by Shane Ambler
Diffstat (limited to 'source/blender/editors/transform/transform.c')
-rw-r--r-- | source/blender/editors/transform/transform.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index c77ce177cdc..2c88402352b 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -1631,6 +1631,11 @@ int initTransform(bContext *C, TransInfo *t, wmOperator *op, wmEvent *event, int break; case TFM_EDGE_SLIDE: initEdgeSlide(t); + if(t->state == TRANS_CANCEL) + { + postTrans(C, t); + return 0; + } break; case TFM_BONE_ROLL: initBoneRoll(t); @@ -4766,7 +4771,11 @@ void initEdgeSlide(TransInfo *t) t->mode = TFM_EDGE_SLIDE; t->transform = EdgeSlide; - createSlideVerts(t); + if(!createSlideVerts(t)) { + t->state= TRANS_CANCEL; + return; + } + sld = t->customData; if (!sld) |