Almost-sure-fix for crashes after joining meshes or curves. Was caused by

not updating depsgraph, and still evaluating it.
This commit is contained in:
2005-10-11 19:54:15 +00:00
parent 85939c5839
commit 7a45609dc2
2 changed files with 4 additions and 4 deletions

View File

@@ -3355,11 +3355,11 @@ void join_curve(int type)
cu= ob->data; cu= ob->data;
addlisttolist(&cu->nurb, &tempbase); addlisttolist(&cu->nurb, &tempbase);
DAG_scene_sort(G.scene); // because we removed object(s), call before editmode!
enter_editmode(); enter_editmode();
exit_editmode(1); exit_editmode(1);
DAG_scene_sort(G.scene); // because we removed object(s)
allqueue(REDRAWVIEW3D, 0); allqueue(REDRAWVIEW3D, 0);
allqueue(REDRAWBUTSEDIT, 0); allqueue(REDRAWBUTSEDIT, 0);
BIF_undo_push("Join"); BIF_undo_push("Join");

View File

@@ -428,13 +428,13 @@ void join_mesh(void)
/* other mesh users */ /* other mesh users */
test_object_materials((ID *)me); test_object_materials((ID *)me);
DAG_scene_sort(G.scene); // removed objects, need to rebuild dag before editmode call
enter_editmode(); enter_editmode();
exit_editmode(1); // freedata, but no undo exit_editmode(1); // freedata, but no undo
allqueue(REDRAWVIEW3D, 0); allqueue(REDRAWVIEW3D, 0);
allqueue(REDRAWBUTSSHADING, 0); allqueue(REDRAWBUTSSHADING, 0);
DAG_scene_sort(G.scene); // removed objects, need to rebuild dag
DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA);
BIF_undo_push("Join Mesh"); BIF_undo_push("Join Mesh");
} }