]> Nutra Git (v2) - gamesguru/feather.git/commitdiff
Coins: fix filter
authortobtoht <thotbot@protonmail.com>
Fri, 2 Jul 2021 15:52:03 +0000 (17:52 +0200)
committertobtoht <thotbot@protonmail.com>
Fri, 2 Jul 2021 15:52:03 +0000 (17:52 +0200)
src/model/CoinsProxyModel.cpp

index 0c4f4a0df91bf077cb268a7a215f0d3ef13e6272..50318f7e6d765026193f4eccf13e0af27af13205 100644 (file)
@@ -28,11 +28,15 @@ bool CoinsProxyModel::filterAcceptsRow(int sourceRow, const QModelIndex &sourceP
 {
     CoinsInfo* coin = m_coins->coin(sourceRow);
 
+    if (!m_showSpent && coin->spent()) {
+        return false;
+    }
+
     if (!m_searchRegExp.pattern().isEmpty()) {
         return coin->pubKey().contains(m_searchRegExp) || coin->address().contains(m_searchRegExp)
                 || coin->hash().contains(m_searchRegExp) || coin->addressLabel().contains(m_searchRegExp)
                 || coin->description().contains(m_searchRegExp);
     }
 
-    return !(!m_showSpent && coin->spent()) && coin->subaddrAccount() == 0;
+    return true;
 }
\ No newline at end of file