From 319840bad1754ce33ec60000df7972e73401860d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20=27dreamsComeTrue=27=20Jasi=C5=84ski?= Date: Sun, 1 Mar 2020 09:44:48 +0100 Subject: [PATCH] Take correct part of extension with File Dialog Fixes #36697 --- editor/editor_file_dialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp index 62626804546..06b32bdd767 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 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(); }