Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <julian@blender.org>2020-12-08 23:19:22 +0300
committerJulian Eisel <julian@blender.org>2020-12-08 23:23:55 +0300
commite17967f890a09c3bd810632c2c3244f9f988919f (patch)
tree64de62c36690f84e07633ea67f8dc23652d5058a
parent41fa1fea406b45017da93c8ac74620be1fb32040 (diff)
Fix T83559: File Browser uses wrong operation
When opening a temporary File Browser, we have to make sure the file selection parameters are refreshed. When opening it in a new Window that would always be the case, if the File Browser uses a maximized window (as set in the Preferences), it might reuse space-data from a previous use. So we have to force the refresh. Also renamed the relevant function to be more clear about what it's doing. Mistake in 95b3c4c966f9.
-rw-r--r--source/blender/editors/space_file/filesel.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c
index ffa44083473..6e933e53a8f 100644
--- a/source/blender/editors/space_file/filesel.c
+++ b/source/blender/editors/space_file/filesel.c
@@ -90,7 +90,7 @@ FileSelectParams *ED_fileselect_get_active_params(const SpaceFile *sfile)
/**
* \note RNA_struct_property_is_set_ex is used here because we want
* the previously used settings to be used here rather than overriding them */
-static void fileselect_ensure_file_params(SpaceFile *sfile)
+static FileSelectParams *fileselect_ensure_updated_file_params(SpaceFile *sfile)
{
FileSelectParams *params;
wmOperator *op = sfile->op;
@@ -323,12 +323,14 @@ static void fileselect_ensure_file_params(SpaceFile *sfile)
if (sfile->layout) {
sfile->layout->dirty = true;
}
+
+ return params;
}
FileSelectParams *ED_fileselect_ensure_active_params(SpaceFile *sfile)
{
if (!sfile->params) {
- fileselect_ensure_file_params(sfile);
+ fileselect_ensure_updated_file_params(sfile);
}
return sfile->params;
}
@@ -369,7 +371,7 @@ void ED_fileselect_set_params_from_userdef(SpaceFile *sfile)
wmOperator *op = sfile->op;
UserDef_FileSpaceData *sfile_udata = &U.file_space_data;
- FileSelectParams *params = ED_fileselect_ensure_active_params(sfile);
+ FileSelectParams *params = fileselect_ensure_updated_file_params(sfile);
if (!op) {
return;
}