diff --git a/src/GUI/gui.cpp b/src/GUI/gui.cpp index 8b602262..af350a62 100644 --- a/src/GUI/gui.cpp +++ b/src/GUI/gui.cpp @@ -355,6 +355,7 @@ void GUI::createActions(TreeNode &mapActions, _showTracksAction = new QAction(tr("Show tracks"), this); _showTracksAction->setMenuRole(QAction::NoRole); _showTracksAction->setCheckable(true); + _showTracksAction->setShortcut(SHOW_TRACKS_SHORTCUT); connect(_showTracksAction, &QAction::triggered, this, &GUI::showTracks); _showRoutesAction = new QAction(tr("Show routes"), this); _showRoutesAction->setMenuRole(QAction::NoRole); @@ -408,6 +409,7 @@ void GUI::createActions(TreeNode &mapActions, _downloadDEMAction = new QAction(tr("Download DEM data"), this); _downloadDEMAction->setMenuRole(QAction::NoRole); _downloadDEMAction->setEnabled(false); + _downloadDEMAction->setShortcut(DOWNLOAD_DEM_SHORTCUT); connect(_downloadDEMAction, &QAction::triggered, this, &GUI::downloadDEM); // Graph actions diff --git a/src/GUI/keys.h b/src/GUI/keys.h index c37f42d4..309e1e99 100644 --- a/src/GUI/keys.h +++ b/src/GUI/keys.h @@ -28,6 +28,8 @@ #define PREV_MAP_SHORTCUT QKeySequence(QKeySequence::Back) #define SHOW_GRAPHS_SHORTCUT QKeySequence(Qt::CTRL + Qt::Key_G) #define STATISTICS_SHORTCUT QKeySequence(Qt::CTRL + Qt::Key_S) +#define DOWNLOAD_DEM_SHORTCUT QKeySequence(Qt::CTRL + Qt::Key_D) +#define SHOW_TRACKS_SHORTCUT QKeySequence(Qt::CTRL + Qt::Key_T) #define FULLSCREEN_SHORTCUT (QKeySequence(QKeySequence::FullScreen).isEmpty() \ ? QKeySequence(Qt::Key_F11) \ : QKeySequence(QKeySequence::FullScreen))