From 5b4fa8a93e6f7fbfb590892764aa92e2e4533d76 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 28 Jun 2006 13:49:11 +0000 Subject: [PATCH] Fix for bug #4523: - Crash on collapse with subsurf modifier. Cause was a missing DAG update when calling from the 3d view header menu. There really should be some standard way to place these countall, DAG update, redraw and undo push calls for editmesh tools, now they're in random places in the editmesh and UI code. --- source/blender/src/editmesh_tools.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/source/blender/src/editmesh_tools.c b/source/blender/src/editmesh_tools.c index bda748688a8..2eb74b4c582 100644 --- a/source/blender/src/editmesh_tools.c +++ b/source/blender/src/editmesh_tools.c @@ -6131,6 +6131,8 @@ int collapseEdges(void) removedoublesflag(1, MERGELIMIT); /*get rid of this!*/ countall(); + DAG_object_flush_update(G.scene, G.obedit, OB_RECALC_DATA); + allqueue(REDRAWVIEW3D, 0); return mergecount; } @@ -6185,6 +6187,8 @@ int merge_target(int target, int uvmerge) } countall(); + DAG_object_flush_update(G.scene, G.obedit, OB_RECALC_DATA); + allqueue(REDRAWVIEW3D, 0); return removedoublesflag(1,MERGELIMIT); } @@ -6351,6 +6355,8 @@ void pathselect(void) BLI_heap_free(heap, NULL); EM_select_flush(); countall(); + DAG_object_flush_update(G.scene, G.obedit, OB_RECALC_DATA); + allqueue(REDRAWVIEW3D, 0); } } else{ @@ -6386,6 +6392,8 @@ void region_to_loop(void) G.scene->selectmode = SCE_SELECT_EDGE; EM_selectmode_set(); countall(); + DAG_object_flush_update(G.scene, G.obedit, OB_RECALC_DATA); + allqueue(REDRAWVIEW3D, 0); BIF_undo_push("Face Region to Edge Loop"); } @@ -6542,5 +6550,7 @@ void loop_to_region(void) countall(); freecollections(&allcollections); + DAG_object_flush_update(G.scene, G.obedit, OB_RECALC_DATA); + allqueue(REDRAWVIEW3D, 0); BIF_undo_push("Edge Loop to Face Region"); }