Take correct part of extension with File Dialog

Fixes #36697
This commit is contained in:
Dominik 'dreamsComeTrue' Jasiński 2020-03-01 09:44:48 +01:00
parent 0e25f54755
commit 319840bad1
1 changed files with 1 additions and 1 deletions

View File

@ -691,7 +691,7 @@ void EditorFileDialog::update_file_name() {
String base_name = file_str.get_basename(); String base_name = file_str.get_basename();
Vector<String> filter_substr = filter_str.split(";"); Vector<String> filter_substr = filter_str.split(";");
if (filter_substr.size() >= 2) { 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 { } else {
file_str = base_name + "." + filter_str.get_extension().strip_edges().to_lower(); file_str = base_name + "." + filter_str.get_extension().strip_edges().to_lower();
} }