From 7d2f359a0c5ec72d07f95491baa698b800b04069 Mon Sep 17 00:00:00 2001 From: Nathan Warden Date: Wed, 14 Jan 2015 18:02:51 -0500 Subject: File path in save dialog automatically appended with correct extension if not manually added by the user. --- scene/gui/file_dialog.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp index a7ff1431bd..a98cb841dc 100644 --- a/scene/gui/file_dialog.cpp +++ b/scene/gui/file_dialog.cpp @@ -184,7 +184,8 @@ void FileDialog::_action_pressed() { if (idx>=0 && idx0) { + String str = (flt.get_slice(",",0).strip_edges()); + f+=str.substr(1, str.length()-1); + valid=true; + } } else { valid=true; } -- cgit v1.2.3