diff --git a/src/blackgui/components/dbmappingcomponent.cpp b/src/blackgui/components/dbmappingcomponent.cpp index 0e2c237e4..e2b19461a 100644 --- a/src/blackgui/components/dbmappingcomponent.cpp +++ b/src/blackgui/components/dbmappingcomponent.cpp @@ -27,6 +27,7 @@ #include "blackgui/models/aircraftmodellistmodel.h" #include "blackgui/views/aircraftmodelview.h" #include "blackgui/views/viewbase.h" +#include "blackgui/shortcut.h" #include "blackmisc/aviation/aircrafticaocode.h" #include "blackmisc/aviation/livery.h" #include "blackmisc/icons.h" @@ -39,7 +40,7 @@ #include #include #include -#include +#include #include #include #include @@ -129,9 +130,10 @@ namespace BlackGui ui->tw_ModelsToBeMapped->setTabIcon(TabOwnModels, CIcons::appModels16()); ui->tw_ModelsToBeMapped->setTabIcon(TabOwnModelSet, CIcons::appModels16()); - // custom menu + // custom menu and shortcut this->setContextMenuPolicy(Qt::CustomContextMenu); connect(this, &CDbMappingComponent::customContextMenuRequested, this, &CDbMappingComponent::ps_onCustomContextMenu); + new QShortcut(CShortcut::keyAddToModelSet(), this, SLOT(ps_addToOwnModelSet())); // vPilot this->initVPilotLoading(); diff --git a/src/blackgui/shortcut.cpp b/src/blackgui/shortcut.cpp index 0bf990117..5dfd4f402 100644 --- a/src/blackgui/shortcut.cpp +++ b/src/blackgui/shortcut.cpp @@ -22,6 +22,12 @@ namespace BlackGui return k; } + const QKeySequence &CShortcut::keyAddToModelSet() + { + static const QKeySequence k(Qt::ALT + Qt::Key_A); + return k; + } + const QKeySequence &CShortcut::keyClearSelection() { static const QKeySequence k(Qt::CTRL + Qt::Key_Space); diff --git a/src/blackgui/shortcut.h b/src/blackgui/shortcut.h index d6791cfb1..206d4a77a 100644 --- a/src/blackgui/shortcut.h +++ b/src/blackgui/shortcut.h @@ -32,6 +32,9 @@ namespace BlackGui //! For stashing models static const QKeySequence &keyStash(); + //! Add to model set + static const QKeySequence &keyAddToModelSet(); + //! For deselecting all static const QKeySequence &keyClearSelection();