Fix 'Load Factory Settings' loosing the keymap

Caused by recent move to Python based keymaps.
This commit is contained in:
Campbell Barton
2018-11-10 11:04:32 +11:00
parent 0121258770
commit dc21ef7b86

View File

@@ -511,6 +511,13 @@ static void wm_file_read_post(bContext *C, const bool is_startup_file, const boo
}
BPY_python_reset(C);
addons_loaded = true;
if (!G.background) {
/* Load the keymap from Python, otherwise we get an empty keymap. */
BPY_execute_string(
C, (const char *[]){"bpy", NULL},
"bpy.utils.keyconfig_set(bpy.utils.preset_find('blender', 'keyconfig'))");
}
}
}
else {