summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Yuri Kunde Schlesner2015-09-07 22:00:08 -0300
committerGravatar Yuri Kunde Schlesner2015-09-07 22:00:08 -0300
commit06b3891c66ee42645d760ea56cbde8e2769d26a6 (patch)
treee64eae7701dbfe26e4b1223351d0bd9cba549b07 /src
parentMerge pull request #1118 from Kloen/monospace-font (diff)
downloadyuzu-06b3891c66ee42645d760ea56cbde8e2769d26a6.tar.gz
yuzu-06b3891c66ee42645d760ea56cbde8e2769d26a6.tar.xz
yuzu-06b3891c66ee42645d760ea56cbde8e2769d26a6.zip
citra-qt: Trim recently used files list to size when insterting new item
Even though they weren't visible in the UI, old entries would never be removed from the list and would be stored in the config file across sessions.
Diffstat (limited to 'src')
-rw-r--r--src/citra_qt/main.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp
index 11813a2a8..65b5fc9d6 100644
--- a/src/citra_qt/main.cpp
+++ b/src/citra_qt/main.cpp
@@ -297,6 +297,10 @@ void GMainWindow::StoreRecentFile(const QString& filename)
297 QStringList recent_files = settings.value("recentFiles").toStringList(); 297 QStringList recent_files = settings.value("recentFiles").toStringList();
298 recent_files.prepend(filename); 298 recent_files.prepend(filename);
299 recent_files.removeDuplicates(); 299 recent_files.removeDuplicates();
300 while (recent_files.size() > max_recent_files_item) {
301 recent_files.removeLast();
302 }
303
300 settings.setValue("recentFiles", recent_files); 304 settings.setValue("recentFiles", recent_files);
301 305
302 UpdateRecentFiles(); 306 UpdateRecentFiles();