svn merge -r 30566:30717 https://svn.blender.org/svnroot/bf-blender/trunk/blender
[blender-staging.git] / source / blender / editors / mesh / editmesh_tools.c
index 7f20103931e0d5a5cde08632c5c0a296127eb929..ea89877b7cd33bff0836b37f67296934cda76c52 100644 (file)
@@ -3095,21 +3095,21 @@ static void givequadverts(EditFace *efa, EditFace *efa1, EditVert **v1, EditVert
 
        if VTEST(efa1, 1, efa) {
                *v3= efa1->v1;
-               *v4= efa1->v2;
+               *v4= (efa1->v2 == *v2)? efa1->v3: efa1->v2;
                vindex[2]= 0;
-               vindex[3]= 1;
+               vindex[3]= (efa1->v2 == *v2)? 2: 1;
        }
        else if VTEST(efa1, 2, efa) {
                *v3= efa1->v2;
-               *v4= efa1->v3;
+               *v4= (efa1->v3 == *v2)? efa1->v1: efa1->v3;
                vindex[2]= 1;
-               vindex[3]= 2;
+               vindex[3]= (efa1->v3 == *v2)? 0: 2;
        }
        else if VTEST(efa1, 3, efa) {
                *v3= efa1->v3;
-               *v4= efa1->v1;
+               *v4= (efa1->v1 == *v2)? efa1->v2: efa1->v1;
                vindex[2]= 2;
-               vindex[3]= 0;
+               vindex[3]= (efa1->v1 == *v2)? 1: 0;
        }
        else
                *v3= *v4= NULL;