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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2013-02-28 20:37:18 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2013-02-28 20:37:18 +0400
commit5f1978dbd25b0705a10f9ad5085e9032d99bf78a (patch)
tree365c45e6077e58b6b2114a1207443f1559bc31da /source/blender/editors
parentc0a3ebedb331f1a10b5ba56030327596a5435598 (diff)
Fix #34366: mesh.select_mode operator could not be configure the use_extend
and use_expand properly. These are hardcoded to shift and ctrl to make them work when clicking buttons or menus. Now it checks if the properties are set, which is still not ideal but makes it possible to override them from the key configuration.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/mesh/editmesh_select.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c
index 2c6ce107eae..7a2975375a9 100644
--- a/source/blender/editors/mesh/editmesh_select.c
+++ b/source/blender/editors/mesh/editmesh_select.c
@@ -923,9 +923,13 @@ static int edbm_select_mode_exec(bContext *C, wmOperator *op)
static int edbm_select_mode_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
- // RNA_enum_set(op->ptr, "type"); /* type must be set already */
- RNA_boolean_set(op->ptr, "use_extend", event->shift);
- RNA_boolean_set(op->ptr, "use_expand", event->ctrl);
+ /* detecting these options based on shift/ctrl here is weak, but it's done
+ * to make this work when clicking buttons or menus */
+ if (!RNA_struct_property_is_set(op->ptr, "use_extend"))
+ RNA_boolean_set(op->ptr, "use_extend", event->shift);
+ if (!RNA_struct_property_is_set(op->ptr, "use_expand"))
+ RNA_boolean_set(op->ptr, "use_expand", event->ctrl);
+
return edbm_select_mode_exec(C, op);
}