mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
Turn off the scheduler when the user manually changes the rate limits mode.
This commit is contained in:
parent
d0893bc1c7
commit
18b9de831f
2 changed files with 10 additions and 2 deletions
|
@ -356,7 +356,7 @@ void QBtSession::configureSession() {
|
|||
}
|
||||
bd_scheduler->start();
|
||||
} else {
|
||||
if (bd_scheduler) delete bd_scheduler;
|
||||
delete bd_scheduler;
|
||||
}
|
||||
#ifndef DISABLE_GUI
|
||||
// Resolve countries
|
||||
|
@ -708,6 +708,9 @@ void QBtSession::useAlternativeSpeedsLimit(bool alternative) {
|
|||
qDebug() << Q_FUNC_INFO << alternative;
|
||||
// Save new state to remember it on startup
|
||||
Preferences pref;
|
||||
// Stop the scheduler when the user has manually changed the bandwidth mode
|
||||
if (!pref.isSchedulerEnabled())
|
||||
delete bd_scheduler;
|
||||
pref.setAltBandwidthEnabled(alternative);
|
||||
// Apply settings to the bittorrent session
|
||||
int down_limit = alternative ? pref.getAltGlobalDownloadLimit() : pref.getGlobalDownloadLimit();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue