svn merge -r 31314:31370 https://svn.blender.org/svnroot/bf-blender/trunk/blender
[blender-staging.git] / source / blender / editors / mesh / editmesh_tools.c
index 799ef580f631eed5cae95fd95138761506a601be..6b20a1041b378752e441f90d570ec01f965e7d5f 100644 (file)
@@ -479,16 +479,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;
 }