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.
This commit is contained in:
Karol Kosek 2021-07-13 18:45:01 +02:00 committed by Andreas Kling
parent f09e361eef
commit 5c89305fc6
Notes: sideshowbarker 2024-07-19 17:25:16 +09:00

View File

@ -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();
}
};