mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-05 15:12:32 -06:00
Save the new save path first in the history. Closes #2382.
This commit is contained in:
@@ -262,10 +262,10 @@ void AddNewTorrentDialog::saveSavePathHistory() const
|
|||||||
history_dirs << QDir(dir);
|
history_dirs << QDir(dir);
|
||||||
if (!history_dirs.contains(selected_save_path)) {
|
if (!history_dirs.contains(selected_save_path)) {
|
||||||
// Add save path to history
|
// Add save path to history
|
||||||
history << selected_save_path.absolutePath();
|
history.push_front(selected_save_path.absolutePath());
|
||||||
// Limit list size
|
// Limit list size
|
||||||
if (history.size() > 8)
|
if (history.size() > 8)
|
||||||
history.removeFirst();
|
history.pop_back();
|
||||||
// Save history
|
// Save history
|
||||||
pref->setAddNewTorrentDialogPathHistory(history);
|
pref->setAddNewTorrentDialogPathHistory(history);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user