diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-06-11 10:24:00 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-06-11 10:24:00 +0300 |
commit | 3f648f5b423347fa31e60cf52701a10862a157f1 (patch) | |
tree | 1fae9fc722d34bc43b6d1756ae91c9157c86d4c5 /source/blender/editors/space_buttons | |
parent | e43a948a2ca7aef365ac0e6808341215e35ee4ff (diff) |
Fix T77171: File selector doesn't tag preferences to be saved
Diffstat (limited to 'source/blender/editors/space_buttons')
-rw-r--r-- | source/blender/editors/space_buttons/buttons_ops.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/editors/space_buttons/buttons_ops.c b/source/blender/editors/space_buttons/buttons_ops.c index 9af623d8065..53a904438eb 100644 --- a/source/blender/editors/space_buttons/buttons_ops.c +++ b/source/blender/editors/space_buttons/buttons_ops.c @@ -83,6 +83,7 @@ typedef struct FileBrowseOp { PointerRNA ptr; PropertyRNA *prop; bool is_undo; + bool is_userdef; } FileBrowseOp; static int file_browse_exec(bContext *C, wmOperator *op) @@ -148,6 +149,11 @@ static int file_browse_exec(bContext *C, wmOperator *op) } } + /* Tag user preferences as dirty. */ + if (fbo->is_userdef) { + U.runtime.is_dirty = true; + } + MEM_freeN(op->customdata); return OPERATOR_FINISHED; @@ -164,6 +170,7 @@ static int file_browse_invoke(bContext *C, wmOperator *op, const wmEvent *event) PointerRNA ptr; PropertyRNA *prop; bool is_undo; + bool is_userdef; FileBrowseOp *fbo; char *str; @@ -172,7 +179,7 @@ static int file_browse_invoke(bContext *C, wmOperator *op, const wmEvent *event) return OPERATOR_CANCELLED; } - UI_context_active_but_prop_get_filebrowser(C, &ptr, &prop, &is_undo); + UI_context_active_but_prop_get_filebrowser(C, &ptr, &prop, &is_undo, &is_userdef); if (!prop) { return OPERATOR_CANCELLED; @@ -209,6 +216,7 @@ static int file_browse_invoke(bContext *C, wmOperator *op, const wmEvent *event) fbo->ptr = ptr; fbo->prop = prop; fbo->is_undo = is_undo; + fbo->is_userdef = is_userdef; op->customdata = fbo; /* normally ED_fileselect_get_params would handle this but we need to because of stupid |