mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 00:16:51 +08:00
Ref T451, context menu in views (simulated aircraft/model) to disable model
This commit is contained in:
committed by
Mat Sutcliffe
parent
158ba34936
commit
93cf349a04
@@ -332,6 +332,19 @@ namespace BlackGui
|
||||
a->setChecked(this->derivedModel()->highlightModelStrings());
|
||||
addStashMenu = true;
|
||||
}
|
||||
|
||||
// client specific
|
||||
if (m_menus.testFlag(MenuDisableModelsTemp) && this->hasSelection())
|
||||
{
|
||||
if (!m_menuFlagActions.contains(MenuDisableModelsTemp))
|
||||
{
|
||||
CMenuActions ma;
|
||||
ma.addAction(CIcons::delete16(), "Temp.disable model", CMenuAction::pathModel(), { this, &CAircraftModelView::requestTempDisable });
|
||||
m_menuFlagActions.insert(MenuDisableModelsTemp, ma);
|
||||
}
|
||||
menuActions.addActions(initMenuActions(CViewBaseNonTemplate::MenuDisableModelsTemp));
|
||||
}
|
||||
|
||||
if (addStashMenu) { menuActions.addMenuStash(); }
|
||||
|
||||
// base class menus
|
||||
@@ -403,6 +416,15 @@ namespace BlackGui
|
||||
sGui->displayInStatusBar(CStatusMessage(CStatusMessage::SeverityInfo, "Stashed " + models.getModelStringList(true).join(" ")));
|
||||
}
|
||||
|
||||
void CAircraftModelView::requestTempDisable()
|
||||
{
|
||||
if (!m_menus.testFlag(MenuCanStashModels)) { return; }
|
||||
if (!this->hasSelection()) { return; }
|
||||
const CAircraftModelList models(this->selectedObjects());
|
||||
emit this->requestTempDisableModelsForMatching(models);
|
||||
sGui->displayInStatusBar(CStatusMessage(CStatusMessage::SeverityInfo, "Temp.disabled " + models.getModelStringList(true).join(" ")));
|
||||
}
|
||||
|
||||
void CAircraftModelView::displayModelStatisticsDialog()
|
||||
{
|
||||
if (!m_statisticsDialog)
|
||||
|
||||
Reference in New Issue
Block a user