mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-19 09:55:40 +00:00
CResourceProxyModel: Simplify exit cases in filterAcceptsRow()
This commit is contained in:
@@ -61,16 +61,17 @@ bool CResourceProxyModel::filterAcceptsRow(int SourceRow, const QModelIndex& rkS
|
|||||||
if (pEntry && !IsTypeAccepted(pEntry->TypeInfo()))
|
if (pEntry && !IsTypeAccepted(pEntry->TypeInfo()))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Compare search results
|
if (mSearchString.IsEmpty())
|
||||||
if (!mSearchString.IsEmpty())
|
return true;
|
||||||
{
|
|
||||||
if (!pEntry)
|
if (!pEntry)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
// Compare search results
|
||||||
const bool HasNameMatch = pEntry->UppercaseName().Contains(mSearchString);
|
const bool HasNameMatch = pEntry->UppercaseName().Contains(mSearchString);
|
||||||
|
if (HasNameMatch)
|
||||||
|
return true;
|
||||||
|
|
||||||
if (!HasNameMatch)
|
|
||||||
{
|
|
||||||
bool HasIDMatch = false;
|
bool HasIDMatch = false;
|
||||||
|
|
||||||
if (mCompareBitLength > 0)
|
if (mCompareBitLength > 0)
|
||||||
@@ -98,8 +99,6 @@ bool CResourceProxyModel::filterAcceptsRow(int SourceRow, const QModelIndex& rkS
|
|||||||
|
|
||||||
if (!HasIDMatch)
|
if (!HasIDMatch)
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user