summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik 'dreamsComeTrue' Jasiński <dominikjasinski@o2.pl>2020-03-01 09:44:48 +0100
committerDominik 'dreamsComeTrue' Jasiński <dominikjasinski@o2.pl>2020-03-01 09:44:48 +0100
commit319840bad1754ce33ec60000df7972e73401860d (patch)
tree9582df15d4287c50c7f72e1354b3d9294cbf9a30
parent0e25f54755a5e37fe64e328b7cd3ce4058245f09 (diff)
Take correct part of extension with File Dialog
Fixes #36697
-rw-r--r--editor/editor_file_dialog.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp
index 6262680454..06b32bdd76 100644
--- a/editor/editor_file_dialog.cpp
+++ b/editor/editor_file_dialog.cpp
@@ -691,7 +691,7 @@ void EditorFileDialog::update_file_name() {
String base_name = file_str.get_basename();
Vector<String> filter_substr = filter_str.split(";");
if (filter_substr.size() >= 2) {
- file_str = base_name + "." + filter_substr[1].strip_edges().to_lower();
+ file_str = base_name + "." + filter_substr[0].strip_edges().lstrip("*.").to_lower();
} else {
file_str = base_name + "." + filter_str.get_extension().strip_edges().to_lower();
}