mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:17:36 +00:00
Maps: Add FavoritesModel and remove hacky misusage of JSONArrayModel
This commit is contained in:
parent
29026ce965
commit
bd86beb7e4
7 changed files with 224 additions and 74 deletions
|
@ -123,7 +123,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
auto favorites_icon = TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/app-hearts.png"sv));
|
||||
map_widget.add_context_menu_action(GUI::Action::create(
|
||||
"Add to &Favorites", favorites_icon, [favorites_panel, &map_widget](auto&) {
|
||||
MUST(favorites_panel->add_favorite({ "Unnamed place"_string, map_widget.context_menu_latlng(), map_widget.zoom() }));
|
||||
favorites_panel->add_favorite({ "Unnamed place"_string, map_widget.context_menu_latlng(), map_widget.zoom() });
|
||||
},
|
||||
window));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue