mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 00:16:51 +08:00
Ref T451, added disable functionality in matcher
This commit is contained in:
committed by
Mat Sutcliffe
parent
b648960b59
commit
7f9182a1c4
@@ -753,6 +753,26 @@ namespace BlackCore
|
||||
return models.size();
|
||||
}
|
||||
|
||||
void CAircraftMatcher::disableModelsForMatching(const CAircraftModelList &removedModels, bool incremental)
|
||||
{
|
||||
if (incremental)
|
||||
{
|
||||
m_modelSet.removeModelsWithString(removedModels, Qt::CaseInsensitive);
|
||||
m_disabledModels.push_back(removedModels);
|
||||
}
|
||||
else
|
||||
{
|
||||
this->restoreDisabledModels();
|
||||
m_disabledModels = removedModels;
|
||||
m_modelSet.removeModelsWithString(removedModels, Qt::CaseInsensitive);
|
||||
}
|
||||
}
|
||||
|
||||
void CAircraftMatcher::restoreDisabledModels()
|
||||
{
|
||||
m_modelSet.replaceOrAddModelsWithString(m_disabledModels, Qt::CaseInsensitive);
|
||||
}
|
||||
|
||||
void CAircraftMatcher::setDefaultModel(const CAircraftModel &defaultModel)
|
||||
{
|
||||
m_defaultModel = defaultModel;
|
||||
|
||||
Reference in New Issue
Block a user