mirror of
https://github.com/PabloMK7/citra.git
synced 2024-11-17 20:37:18 +01:00
Merge pull request #1124 from yuriks/trim-mru
citra-qt: Trim recently used files list to size when insterting new item
This commit is contained in:
commit
623fbdd66f
@ -297,6 +297,10 @@ void GMainWindow::StoreRecentFile(const QString& filename)
|
|||||||
QStringList recent_files = settings.value("recentFiles").toStringList();
|
QStringList recent_files = settings.value("recentFiles").toStringList();
|
||||||
recent_files.prepend(filename);
|
recent_files.prepend(filename);
|
||||||
recent_files.removeDuplicates();
|
recent_files.removeDuplicates();
|
||||||
|
while (recent_files.size() > max_recent_files_item) {
|
||||||
|
recent_files.removeLast();
|
||||||
|
}
|
||||||
|
|
||||||
settings.setValue("recentFiles", recent_files);
|
settings.setValue("recentFiles", recent_files);
|
||||||
|
|
||||||
UpdateRecentFiles();
|
UpdateRecentFiles();
|
||||||
|
Loading…
Reference in New Issue
Block a user