refs #577, filter for aircraft model

* allow to filter by distributor
* filter by simulator on change
This commit is contained in:
Klaus Basan
2016-01-25 00:12:13 +01:00
parent 572b604908
commit c54dd8560d
13 changed files with 121 additions and 16 deletions

View File

@@ -34,6 +34,13 @@ namespace BlackMisc
return (getDbKey() == s || getAlias1() == s || getAlias2() == s);
}
bool CDistributor::matchesKeyOrAlias(const CDistributor &distributor) const
{
if (distributor.hasValidDbKey() && this->matchesKeyOrAlias(distributor.getDbKey())) { return true; }
if (distributor.hasAlias1() && this->matchesKeyOrAlias(distributor.getAlias1())) { return true; }
return (distributor.hasAlias2() && this->matchesKeyOrAlias(distributor.getAlias2()));
}
CVariant CDistributor::propertyByIndex(const CPropertyIndex &index) const
{
if (index.isMyself()) { return CVariant::from(*this); }