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@gmail.com>2018-11-13 21:02:12 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-11-13 21:29:13 +0300
commitca6dd692b5b0137d236f14ed306196662f0cd869 (patch)
tree579ae2480246e89572365a8ef0662f33a9bb06c2 /source/blender/makesrna/intern/rna_userdef.c
parentc39d5a6c88dcda9dff9626d7b059a98913da6fd2 (diff)
Keymaps: reload key configuration when changing select mouse.
For configuration scripts that want to change keymaps based on this setting.
Diffstat (limited to 'source/blender/makesrna/intern/rna_userdef.c')
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 1ea5c164449..84258835b14 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -222,6 +222,11 @@ static void rna_userdef_select_mouse_set(PointerRNA *ptr, int value)
userdef->flag &= ~USER_LMOUSESELECT;
}
+static void rna_userdef_select_mouse_update(bContext *C, Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *UNUSED(ptr))
+{
+ WM_keyconfig_reload(C);
+}
+
static int rna_userdef_autokeymode_get(PointerRNA *ptr)
{
UserDef *userdef = (UserDef *)ptr->data;
@@ -4546,6 +4551,8 @@ static void rna_def_userdef_input(BlenderRNA *brna)
RNA_def_property_enum_items(prop, select_mouse_items);
RNA_def_property_enum_funcs(prop, NULL, "rna_userdef_select_mouse_set", NULL);
RNA_def_property_ui_text(prop, "Select Mouse", "Mouse button used for selection");
+ RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
+ RNA_def_property_update(prop, 0, "rna_userdef_select_mouse_update");
prop = RNA_def_property(srna, "view_zoom_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "viewzoom");