Skip to content

Commit

Permalink
Mobile UI: Add direct skip to 1:1 and 1:2 zoom level
Browse files Browse the repository at this point in the history
Implemented as a menu of Zoom Out button.
  • Loading branch information
lpechacek committed Jan 2, 2018
1 parent 82733b8 commit 090a63d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/gui/map/map_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1364,6 +1364,17 @@ void MapEditorController::createMobileGUI()
bottom_action_bar->addAction(pan_act, 1, col++);

bottom_action_bar->addAction(zoom_out_act, 0, col);
auto zoom_out_button = bottom_action_bar->getButtonForAction(zoom_out_act);
auto mobile_zoom_out_menu = new QMenu(zoom_out_button);
auto base_scale_action = mobile_zoom_out_menu->addAction(tr("Base scale"));
connect(base_scale_action, &QAction::triggered, [this]() {
main_view->setZoom(1);
});
auto mapping_scale_action = mobile_zoom_out_menu->addAction(tr("Mapping scale"));
connect(mapping_scale_action, &QAction::triggered, [this]() {
main_view->setZoom(2);
});
zoom_out_button->setMenu(mobile_zoom_out_menu);

bottom_action_bar->addAction(move_to_gps_pos_act, 1, col++);

Expand Down

0 comments on commit 090a63d

Please sign in to comment.