Merge pull request #36699 from dreamsComeTrue/fix-extension-file-dialog

Take correct part of extension with File Dialog
This commit is contained in:
Rémi Verschelde 2020-03-04 10:36:20 +01:00 committed by GitHub
commit c90ec71bcd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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();
}