Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-03-20 20:03:34 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-03-20 20:03:34 +0400
commitf8611bac8f805974d71501b323ec4a8adf9405d0 (patch)
tree6356141f42e0aef1a58495c8a65c70455ceceeb3 /source/blender/editors/mesh/editmesh_loopcut.c
parent447de0a6c4b9be8d5ca37d4827f2e3b703657d08 (diff)
- add knife project to toolbar.
- when running knife project, disable vertex selection since it may select areas between the newly cut regions. add EDBM_selectmode_disable() function since loopcut does this too. - (optimization) avoid looping over all geometry when flushing and no selection exists.
Diffstat (limited to 'source/blender/editors/mesh/editmesh_loopcut.c')
-rw-r--r--source/blender/editors/mesh/editmesh_loopcut.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/source/blender/editors/mesh/editmesh_loopcut.c b/source/blender/editors/mesh/editmesh_loopcut.c
index 89bfc315094..ee1c274b154 100644
--- a/source/blender/editors/mesh/editmesh_loopcut.c
+++ b/source/blender/editors/mesh/editmesh_loopcut.c
@@ -300,17 +300,11 @@ static void ringsel_finish(bContext *C, wmOperator *op)
EDBM_update_generic(em, false, true);
/* force edge slide to edge select mode in in face select mode */
- if (em->selectmode & SCE_SELECT_FACE) {
- if (em->selectmode == SCE_SELECT_FACE)
- em->selectmode = SCE_SELECT_EDGE;
- else
- em->selectmode &= ~SCE_SELECT_FACE;
- CTX_data_tool_settings(C)->selectmode = em->selectmode;
- EDBM_selectmode_set(em);
-
- WM_event_add_notifier(C, NC_SCENE | ND_TOOLSETTINGS, CTX_data_scene(C));
+ if (EDBM_selectmode_disable(lcd->vc.scene, em, SCE_SELECT_FACE, SCE_SELECT_EDGE)) {
+ /* pass, the change will flush selection */
}
else {
+ /* else flush explicitly */
EDBM_selectmode_flush(lcd->em);
}
}