Fix #22804: own mistake, remove doubles shouldn't get cancelled if no
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Tue, 13 Jul 2010 10:45:40 +0000 (10:45 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Tue, 13 Jul 2010 10:45:40 +0000 (10:45 +0000)
vertices are merged, but finish so the threshold can be tweaked.

source/blender/editors/mesh/editmesh_tools.c

index 681e14d..ca9b0ff 100644 (file)
@@ -485,17 +485,16 @@ static int removedoublesflag_exec(bContext *C, wmOperator *op)
 
        int count = removedoublesflag(em,1,0,RNA_float_get(op->ptr, "limit"));
        
-       if(!count)
-               return OPERATOR_CANCELLED;
+       if(count) {
+               recalc_editnormals(em);
 
-       recalc_editnormals(em);
+               DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+               WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+       }
 
        BKE_reportf(op->reports, RPT_INFO, "Removed %d vertices", count);
-
-       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;
 }