PROP_ENUM_NO_CONTEXT flag for rna properties, forcing enum item functions to be passe...
[blender.git] / source / blender / windowmanager / intern / wm_keymap.c
index 2fa4b022ff9116c7ad7635a945183fcae42198db..7f0f355403d9bf68c844c4a45562dde3dbc59023 100644 (file)
 
 /* ********************* key config ***********************/
 
+static void keymap_properties_set(wmKeyMapItem *kmi)
+{
+       WM_operator_properties_alloc(&(kmi->ptr), &(kmi->properties), kmi->idname);
+       WM_operator_properties_sanitize(kmi->ptr);
+}
+
 void WM_keymap_properties_reset(wmKeyMapItem *kmi)
 {
        WM_operator_properties_free(kmi->ptr);
@@ -65,12 +71,7 @@ void WM_keymap_properties_reset(wmKeyMapItem *kmi)
        kmi->ptr = NULL;
        kmi->properties = NULL;
 
-       WM_operator_properties_alloc(&(kmi->ptr), &(kmi->properties), kmi->idname);
-}
-
-static void keymap_properties_set(wmKeyMapItem *kmi)
-{
-       WM_operator_properties_alloc(&(kmi->ptr), &(kmi->properties), kmi->idname);
+       keymap_properties_set(kmi);
 }
 
 wmKeyConfig *WM_keyconfig_add(wmWindowManager *wm, char *idname)