mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
FontEditor: Don't add duplicate extension in Save As dialog
This commit is contained in:
parent
552789902a
commit
ac2470e66e
Notes:
sideshowbarker
2024-07-19 04:51:54 +09:00
Author: https://github.com/nico Commit: https://github.com/SerenityOS/serenity/commit/ac2470e66e1 Pull-request: https://github.com/SerenityOS/serenity/pull/2778
1 changed files with 2 additions and 1 deletions
|
@ -111,7 +111,8 @@ int main(int argc, char** argv)
|
|||
}));
|
||||
app_menu.add_action(GUI::Action::create("Save as...", { Mod_Ctrl | Mod_Shift, Key_S }, Gfx::Bitmap::load_from_file("/res/icons/16x16/save.png"), [&](auto&) {
|
||||
FontEditorWidget* editor = static_cast<FontEditorWidget*>(window->main_widget());
|
||||
Optional<String> save_path = GUI::FilePicker::get_save_filepath(editor->path(), ".font");
|
||||
LexicalPath lexical_path(editor->path());
|
||||
Optional<String> save_path = GUI::FilePicker::get_save_filepath(lexical_path.title(), lexical_path.extension());
|
||||
if (!save_path.has_value())
|
||||
return;
|
||||
|
||||
|
|
Loading…
Reference in a new issue