svn merge -r 30566:30717 https://svn.blender.org/svnroot/bf-blender/trunk/blender
authorJoerg Mueller <nexyon@gmail.com>
Sun, 25 Jul 2010 13:12:58 +0000 (13:12 +0000)
committerJoerg Mueller <nexyon@gmail.com>
Sun, 25 Jul 2010 13:12:58 +0000 (13:12 +0000)
1  2 
source/blender/editors/mesh/editmesh_tools.c

index 7f20103931e0d5a5cde08632c5c0a296127eb929,4477f375aab649bfbfeee2400465ed33098cf6d3..ea89877b7cd33bff0836b37f67296934cda76c52
@@@ -485,17 -485,16 +485,17 @@@ static int removedoublesflag_exec(bCont
  
        int count = removedoublesflag(em,1,0,RNA_float_get(op->ptr, "limit"));
        
 -      if(count) {
 -              recalc_editnormals(em);
 +      if(!count)
 +              return OPERATOR_CANCELLED;
  
 -              DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
 -              WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
 -      }
 +      recalc_editnormals(em);
  
        BKE_reportf(op->reports, RPT_INFO, "Removed %d vertices", count);
 -      BKE_mesh_end_editmesh(obedit->data, em);
  
 +      DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
 +      WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
 +
 +      BKE_mesh_end_editmesh(obedit->data, em);
        return OPERATOR_FINISHED;
  }
  
@@@ -3095,21 -3094,21 +3095,21 @@@ static void givequadverts(EditFace *efa
  
        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;