svn merge -r 30513:30565 https://svn.blender.org/svnroot/bf-blender/trunk/blender
[blender-staging.git] / source / blender / editors / mesh / editmesh_tools.c
index 52e1b3636eae9a043db149223fc3d96810e096fc..7f20103931e0d5a5cde08632c5c0a296127eb929 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;
 }