mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 15:07:22 -06:00
Properly pre-select the selected torrent's current ratio limiting options in UpDownRatioDlg dialogs. Fixes #7352
This commit is contained in:
committed by
sledgehammer999
parent
d7ce6e39d4
commit
8482464ad0
@@ -627,14 +627,18 @@ void TransferListWidget::setMaxRatioSelectedTorrents()
|
||||
const QList<BitTorrent::TorrentHandle *> torrents = getSelectedTorrents();
|
||||
if (torrents.isEmpty()) return;
|
||||
|
||||
bool useGlobalValue = true;
|
||||
qreal currentMaxRatio = BitTorrent::Session::instance()->globalMaxRatio();
|
||||
if (torrents.count() == 1)
|
||||
currentMaxRatio = torrents[0]->maxRatio(&useGlobalValue);
|
||||
currentMaxRatio = torrents[0]->maxRatio();
|
||||
|
||||
int currentMaxSeedingTime = BitTorrent::Session::instance()->globalMaxSeedingMinutes();
|
||||
if (torrents.count() == 1)
|
||||
currentMaxSeedingTime = torrents[0]->maxSeedingTime(&useGlobalValue);
|
||||
currentMaxSeedingTime = torrents[0]->maxSeedingTime();
|
||||
|
||||
bool useGlobalValue = true;
|
||||
if (torrents.count() == 1)
|
||||
useGlobalValue = (torrents[0]->ratioLimit() == BitTorrent::TorrentHandle::USE_GLOBAL_RATIO)
|
||||
&& (torrents[0]->seedingTimeLimit() == BitTorrent::TorrentHandle::USE_GLOBAL_SEEDING_TIME);
|
||||
|
||||
UpDownRatioDlg dlg(useGlobalValue, currentMaxRatio, BitTorrent::TorrentHandle::MAX_RATIO,
|
||||
currentMaxSeedingTime, BitTorrent::TorrentHandle::MAX_SEEDING_TIME, this);
|
||||
|
||||
Reference in New Issue
Block a user