From cac555dc78047b96486d5c52e990c7dde62f0a6b Mon Sep 17 00:00:00 2001 From: Nathan Warden Date: Fri, 16 Jan 2015 07:48:28 -0500 Subject: [PATCH] When overwriting a file with an auto added extension the file name is now set correctly. --- scene/gui/file_dialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp index a98cb841dc1..fbcfdb69bb6 100644 --- a/scene/gui/file_dialog.cpp +++ b/scene/gui/file_dialog.cpp @@ -156,7 +156,6 @@ void FileDialog::_action_pressed() { if (mode==MODE_SAVE_FILE) { - String ext = f.extension(); bool valid=false; if (filter->get_selected()==filter->get_item_count()-1) { @@ -197,6 +196,7 @@ void FileDialog::_action_pressed() { if (!valid && filterSliceCount>0) { String str = (flt.get_slice(",",0).strip_edges()); f+=str.substr(1, str.length()-1); + file->set_text(f.get_file()); valid=true; } } else {