Fix part of T64679: Missing dirty preferences tag

- Editing shortcuts.
- Editing walk mode navigation.
- Adding/removing paths.
This commit is contained in:
Campbell Barton 2019-05-21 22:08:10 +10:00
parent fbae1c9ed5
commit a459a590c2
3 changed files with 8 additions and 1 deletions

View File

@ -565,7 +565,11 @@ static void ui_but_update_preferences_dirty(uiBut *but)
}
else {
StructRNA *base = RNA_struct_base(but->rnapoin.type);
if (ELEM(base, &RNA_AddonPreferences, &RNA_KeyConfigPreferences)) {
if (ELEM(base,
&RNA_AddonPreferences,
&RNA_KeyConfigPreferences,
&RNA_KeyMapItem,
&RNA_WalkNavigation)) {
tag = true;
}
}

View File

@ -726,6 +726,7 @@ extern StructRNA RNA_View3DOverlay;
extern StructRNA RNA_View3DShading;
extern StructRNA RNA_ViewLayer;
extern StructRNA RNA_VoronoiTexture;
extern StructRNA RNA_WalkNavigation;
extern StructRNA RNA_WarpModifier;
extern StructRNA RNA_WaveModifier;
extern StructRNA RNA_WeightedNormalModifier;

View File

@ -1652,6 +1652,7 @@ static int wm_userpref_autoexec_add_exec(bContext *UNUSED(C), wmOperator *UNUSED
{
bPathCompare *path_cmp = MEM_callocN(sizeof(bPathCompare), "bPathCompare");
BLI_addtail(&U.autoexec_paths, path_cmp);
U.runtime.is_dirty = true;
return OPERATOR_FINISHED;
}
@ -1672,6 +1673,7 @@ static int wm_userpref_autoexec_remove_exec(bContext *UNUSED(C), wmOperator *op)
bPathCompare *path_cmp = BLI_findlink(&U.autoexec_paths, index);
if (path_cmp) {
BLI_freelinkN(&U.autoexec_paths, path_cmp);
U.runtime.is_dirty = true;
}
return OPERATOR_FINISHED;
}