Hide zero status filters when torrents removed

PR #21150.
Closes #21146.
This commit is contained in:
Vladimir Golovnev 2024-08-08 08:19:53 +03:00 committed by Vladimir Golovnev (Glassez)
parent 195eae5f3d
commit 3ad8fcbdd2
No known key found for this signature in database
GPG key ID: 52A2C7DEE2DFA6F7

View file

@ -235,10 +235,7 @@ void StatusFilterWidget::applyFilter(int row)
void StatusFilterWidget::handleTorrentsLoaded(const QVector<BitTorrent::Torrent *> &torrents)
{
for (const BitTorrent::Torrent *torrent : torrents)
updateTorrentStatus(torrent);
updateTexts();
update(torrents);
}
void StatusFilterWidget::torrentAboutToBeDeleted(BitTorrent::Torrent *const torrent)
@ -273,6 +270,12 @@ void StatusFilterWidget::torrentAboutToBeDeleted(BitTorrent::Torrent *const torr
m_nbStalled = m_nbStalledUploading + m_nbStalledDownloading;
updateTexts();
if (Preferences::instance()->getHideZeroStatusFilters())
{
hideZeroItems();
updateGeometry();
}
}
void StatusFilterWidget::configure()