diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-07-08 09:41:22 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-07-08 09:52:10 +0300 |
commit | d5d26338b5a13aaaaefd051efcbbc93c453b57c7 (patch) | |
tree | 6bd643e67c73ed0d1c25d2d353d851fd7fe97d2b /source | |
parent | 83fe139b2b9c37db50c14833cb38877b999db6de (diff) |
Mesh/Curve Join: remove edit-mode toggle
Toggling edit-node after joining objects is redundant as far as I can see -
(dates back to first revision).
Also caused all edges to be drawn w/ meshes, redundant undo step w/ curves.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/curve/editcurve.c | 5 | ||||
-rw-r--r-- | source/blender/editors/mesh/meshtools.c | 13 |
2 files changed, 3 insertions, 15 deletions
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 420f72fedb3..d87f8a6d93d 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -6034,9 +6034,8 @@ int join_curve_exec(bContext *C, wmOperator *op) BLI_movelisttolist(&cu->nurb, &tempbase); DAG_relations_tag_update(bmain); // because we removed object(s), call before editmode! - - ED_object_editmode_enter(C, EM_WAITCURSOR); - ED_object_editmode_exit(C, EM_FREEDATA | EM_WAITCURSOR | EM_DO_UNDO); + + DAG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA); WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene); diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c index 1b2d4b7c130..123f701d405 100644 --- a/source/blender/editors/mesh/meshtools.c +++ b/source/blender/editors/mesh/meshtools.c @@ -564,21 +564,10 @@ int join_mesh_exec(bContext *C, wmOperator *op) BKE_key_sort(key); } - DAG_relations_tag_update(bmain); // removed objects, need to rebuild dag -#if 0 - ED_object_editmode_enter(C, EM_WAITCURSOR); - ED_object_editmode_exit(C, EM_FREEDATA | EM_WAITCURSOR | EM_DO_UNDO); -#else - /* toggle editmode using lower level functions so this can be called from python */ - EDBM_mesh_make(scene->toolsettings, ob, false); - EDBM_mesh_load(ob); - EDBM_mesh_free(me->edit_btmesh); - MEM_freeN(me->edit_btmesh); - me->edit_btmesh = NULL; DAG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA); -#endif + WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene); return OPERATOR_FINISHED; |