summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorKarol Kosek <krkk@krkk.ct8.pl>2021-07-13 18:45:01 +0200
committerAndreas Kling <kling@serenityos.org>2021-07-13 21:16:44 +0200
commit5c89305fc6fce3aeb50725341b95caa8e8da7e5c (patch)
treeef9821694efa872de86fc26c02922ed77284a018 /Userland
parentf09e361eefcbb7c7aeaae0255b9fbb5aa6e5b2db (diff)
downloadserenity-5c89305fc6fce3aeb50725341b95caa8e8da7e5c.zip
LibGUI: Don't clear textbox on save mode in FilePicker
This fixes a rather frustrating issue during saving a file, when clicking on a folder (to change the path of saved file) caused the filename to disappear from the text box.
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibGUI/FilePicker.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibGUI/FilePicker.cpp b/Userland/Libraries/LibGUI/FilePicker.cpp
index 5830155ee3..f71b6bb611 100644
--- a/Userland/Libraries/LibGUI/FilePicker.cpp
+++ b/Userland/Libraries/LibGUI/FilePicker.cpp
@@ -165,7 +165,7 @@ FilePicker::FilePicker(Window* parent_window, Mode mode, const StringView& filen
auto should_open_folder = m_mode == Mode::OpenFolder;
if (should_open_folder == node.is_directory()) {
m_filename_textbox->set_text(node.name);
- } else {
+ } else if (m_mode != Mode::Save) {
m_filename_textbox->clear();
}
};