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 <eiseljulian@gmail.com>2019-09-16 19:14:23 +0300
committerJulian Eisel <eiseljulian@gmail.com>2019-09-16 19:25:31 +0300
commit8d6b0eda5db45b63de8fccea1e3af41bf0bf09e0 (patch)
tree2f49c918125a63460b3878346425efcd44b799c4 /source/blender/editors/space_file/filesel.c
parent3618b2c3599d172cad3e0ee3fa7bd0eb886771a2 (diff)
UI: Show in-/decrement buttons for exporters
As per Brecht's suggestion, use the check_existing property to control visibility of the '+' and '-' icons. It is typically set for save operations. Adds another FileSelectParams flag (to avoid duplicated propertie lookups) and removes the recently introduced FileSelectParams.action_type again. Fixes T69881.
Diffstat (limited to 'source/blender/editors/space_file/filesel.c')
-rw-r--r--source/blender/editors/space_file/filesel.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c
index e54f13e9356..6e576006332 100644
--- a/source/blender/editors/space_file/filesel.c
+++ b/source/blender/editors/space_file/filesel.c
@@ -167,6 +167,9 @@ short ED_fileselect_set_params(SpaceFile *sfile)
params->flag &= ~FILE_DIRSEL_ONLY;
}
+ if ((prop = RNA_struct_find_property(op->ptr, "check_existing"))) {
+ params->flag |= RNA_property_boolean_get(op->ptr, prop) ? FILE_CHECK_EXISTING : 0;
+ }
if ((prop = RNA_struct_find_property(op->ptr, "hide_props_region"))) {
params->flag |= RNA_property_boolean_get(op->ptr, prop) ? FILE_HIDE_TOOL_PROPS : 0;
}
@@ -274,10 +277,6 @@ short ED_fileselect_set_params(SpaceFile *sfile)
params->sort = FILE_SORT_ALPHA;
}
- if ((prop = RNA_struct_find_property(op->ptr, "action_type"))) {
- params->action_type = RNA_property_enum_get(op->ptr, prop);
- }
-
if (params->display == FILE_DEFAULTDISPLAY) {
if (params->display_previous == FILE_DEFAULTDISPLAY) {
if (U.uiflag & USER_SHOW_THUMBNAILS) {