mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 15:15:50 +08:00
Also allow to use SHIFT + button for models, aircraft
* added setTab functions * shift can be used to reset to first tab
This commit is contained in:
@@ -112,14 +112,23 @@ namespace BlackGui
|
||||
void CMainInfoAreaComponent::selectArea(CMainInfoAreaComponent::InfoArea infoArea)
|
||||
{
|
||||
CInfoArea::selectArea(static_cast<int>(infoArea));
|
||||
|
||||
const Qt::KeyboardModifiers km = QGuiApplication::queryKeyboardModifiers();
|
||||
const bool shift = km.testFlag(Qt::ShiftModifier);
|
||||
if (!shift) { return; }
|
||||
|
||||
// pressing shift will go to overview
|
||||
if (infoArea == InfoAreaSettings)
|
||||
{
|
||||
// pressing shift will go to overview
|
||||
const Qt::KeyboardModifiers km = QGuiApplication::queryKeyboardModifiers();
|
||||
if (km.testFlag(Qt::ShiftModifier))
|
||||
{
|
||||
ui->comp_Settings->setSettingsOverviewTab();
|
||||
}
|
||||
ui->comp_Settings->setSettingsOverviewTab();
|
||||
}
|
||||
else if (infoArea == InfoAreaAircraft)
|
||||
{
|
||||
ui->comp_Aircraft->setTab(CAircraftComponent::TabAircraftInRange);
|
||||
}
|
||||
else if (infoArea == InfoAreaMapping)
|
||||
{
|
||||
ui->comp_Mappings->setTab(CMappingComponent::TabRenderedAircraft);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -156,7 +165,7 @@ namespace BlackGui
|
||||
void CMainInfoAreaComponent::selectSettingsTab(int index)
|
||||
{
|
||||
this->selectArea(InfoAreaSettings);
|
||||
ui->comp_Settings->setSettingsTab(static_cast<CSettingsComponent::SettingTab>(index));
|
||||
ui->comp_Settings->setTab(static_cast<CSettingsComponent::SettingTab>(index));
|
||||
}
|
||||
|
||||
void CMainInfoAreaComponent::selectAudioTab()
|
||||
|
||||
Reference in New Issue
Block a user