Skip to content

Commit

Permalink
LibGUI: Don't clear textbox on save mode in FilePicker
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Karol Kosek authored and awesomekling committed Jul 13, 2021
1 parent f09e361 commit 5c89305
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Userland/Libraries/LibGUI/FilePicker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
};
Expand Down

0 comments on commit 5c89305

Please sign in to comment.