mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-18 17:35:43 +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()))
|
||||
return false;
|
||||
|
||||
// Compare search results
|
||||
if (!mSearchString.IsEmpty())
|
||||
{
|
||||
if (mSearchString.IsEmpty())
|
||||
return true;
|
||||
|
||||
if (!pEntry)
|
||||
return false;
|
||||
|
||||
// Compare search results
|
||||
const bool HasNameMatch = pEntry->UppercaseName().Contains(mSearchString);
|
||||
if (HasNameMatch)
|
||||
return true;
|
||||
|
||||
if (!HasNameMatch)
|
||||
{
|
||||
bool HasIDMatch = false;
|
||||
|
||||
if (mCompareBitLength > 0)
|
||||
@@ -98,8 +99,6 @@ bool CResourceProxyModel::filterAcceptsRow(int SourceRow, const QModelIndex& rkS
|
||||
|
||||
if (!HasIDMatch)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user