Skip to content

Commit 954954e

Browse files
lpechacekdg0yt
authored andcommitted
MapEditorController: Select pan tool on touch UI startup
The edit mode is selected by default on editor startup. However, in the touch UI, object editing is rarely the first action to be done after opening a map. The user typically pans the map view to the area of interest first and then starts editing. This code change makes the touch UI start in the view pan mode. The desktop action remains to be editing as the desktop users use mouse middle button for editing. Discussed in GH-982.
1 parent 72ea213 commit 954954e

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/gui/map/map_editor.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -820,6 +820,10 @@ void MapEditorController::attach(MainWindow* window)
820820
if (mobile_mode)
821821
{
822822
createSymbolWidget(window);
823+
824+
// Activate the map view pan tool
825+
pan_act->setChecked(true);
826+
pan();
823827
}
824828
else
825829
{
@@ -830,12 +834,12 @@ void MapEditorController::attach(MainWindow* window)
830834

831835
if (map->getNumColors() == 0)
832836
QTimer::singleShot(0, color_dock_widget, &QWidget::show);
837+
838+
// Activate the edit tool
839+
edit_tool_act->setChecked(true);
840+
setEditTool();
833841
}
834842

835-
// Auto-select the edit tool
836-
edit_tool_act->setChecked(true);
837-
setEditTool();
838-
839843
// Set the coordinates display mode
840844
coordsDisplayChanged();
841845
}

0 commit comments

Comments
 (0)