Fix #146670: Disabled key-map items lost when loading old preferences
Version patching keymaps was only handling new/changed key-map items. However it's important to version patch removed key-map items so they match the key-map items in the updated key-map and disable them. Regression from [0] which copied the error from [1]. Resolve both by updating all key-map items. Ref !147668 [0]:5e2b421996[1]:4986f71848
This commit is contained in:
@@ -54,6 +54,8 @@ struct wmKeyConfigFilterItemParams {
|
||||
uint check_diff_item_add : 1;
|
||||
uint check_diff_item_remove : 1;
|
||||
};
|
||||
/** Use when all items should be manipulated. */
|
||||
#define WM_KEY_CONFIG_FILTER_ITEM_ALL {true, true, true}
|
||||
|
||||
void BKE_keyconfig_keymap_filter_item(struct wmKeyMap *keymap,
|
||||
const struct wmKeyConfigFilterItemParams *params,
|
||||
|
||||
@@ -1349,9 +1349,7 @@ void blo_do_versions_userdef(UserDef *userdef)
|
||||
}
|
||||
|
||||
if (!USER_VERSION_ATLEAST(302, 5)) {
|
||||
wmKeyConfigFilterItemParams params{};
|
||||
params.check_item = true;
|
||||
params.check_diff_item_add = true;
|
||||
const wmKeyConfigFilterItemParams params = WM_KEY_CONFIG_FILTER_ITEM_ALL;
|
||||
BKE_keyconfig_pref_filter_items(userdef, ¶ms, keymap_item_update_tweak_event, nullptr);
|
||||
}
|
||||
|
||||
@@ -1609,9 +1607,7 @@ void blo_do_versions_userdef(UserDef *userdef)
|
||||
}
|
||||
|
||||
if (!USER_VERSION_ATLEAST(405, 11)) {
|
||||
wmKeyConfigFilterItemParams params{};
|
||||
params.check_item = true;
|
||||
params.check_diff_item_add = true;
|
||||
const wmKeyConfigFilterItemParams params = WM_KEY_CONFIG_FILTER_ITEM_ALL;
|
||||
BKE_keyconfig_pref_filter_items(
|
||||
userdef,
|
||||
¶ms,
|
||||
|
||||
Reference in New Issue
Block a user