From d49fff6246569fdfccd8e443f08abdb79ea93156 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Sun, 1 May 2016 11:38:24 +0200 Subject: [PATCH] FileDialog: reset mkdir label after use (#4500) Closes #1686. (cherry picked from commit ab7886ffc41326db9c1b578ff008e90a42cad446) --- scene/gui/file_dialog.cpp | 2 +- tools/editor/editor_dir_dialog.cpp | 1 + tools/editor/editor_file_dialog.cpp | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp index b8b8c99c390..127c78f72a1 100644 --- a/scene/gui/file_dialog.cpp +++ b/scene/gui/file_dialog.cpp @@ -614,7 +614,6 @@ FileDialog::Access FileDialog::get_access() const{ void FileDialog::_make_dir_confirm() { - Error err = dir_access->make_dir( makedirname->get_text() ); if (err==OK) { dir_access->change_dir(makedirname->get_text()); @@ -624,6 +623,7 @@ void FileDialog::_make_dir_confirm() { } else { mkdirerr->popup_centered_minsize(Size2(250,50)); } + makedirname->set_text(""); // reset label } diff --git a/tools/editor/editor_dir_dialog.cpp b/tools/editor/editor_dir_dialog.cpp index 8512154485c..1a92a61882c 100644 --- a/tools/editor/editor_dir_dialog.cpp +++ b/tools/editor/editor_dir_dialog.cpp @@ -189,6 +189,7 @@ void EditorDirDialog::_make_dir_confirm() { } else { reload(); } + makedirname->set_text(""); // reset label } diff --git a/tools/editor/editor_file_dialog.cpp b/tools/editor/editor_file_dialog.cpp index 0e6cf3277ae..9a1da65bb95 100644 --- a/tools/editor/editor_file_dialog.cpp +++ b/tools/editor/editor_file_dialog.cpp @@ -832,7 +832,6 @@ EditorFileDialog::Access EditorFileDialog::get_access() const{ void EditorFileDialog::_make_dir_confirm() { - Error err = dir_access->make_dir( makedirname->get_text() ); if (err==OK) { dir_access->change_dir(makedirname->get_text()); @@ -844,6 +843,7 @@ void EditorFileDialog::_make_dir_confirm() { } else { mkdirerr->popup_centered_minsize(Size2(250,50)); } + makedirname->set_text(""); // reset label }