svn merge -r 30566:30717 https://svn.blender.org/svnroot/bf-blender/trunk/blender
[blender.git] / source / blender / editors / mesh / editmesh_tools.c
index 4477f375aab649bfbfeee2400465ed33098cf6d3..ea89877b7cd33bff0836b37f67296934cda76c52 100644 (file)
@@ -485,16 +485,17 @@ static int removedoublesflag_exec(bContext *C, wmOperator *op)
 
        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;
 }