From f524c7ff4548f42a524086d21e3c9ccb338fdc82 Mon Sep 17 00:00:00 2001 From: M2j Date: Fri, 11 Jun 2010 15:11:50 +0200 Subject: [PATCH] On start without configuration recentFiles might become a python list --- openlp/core/ui/mainwindow.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openlp/core/ui/mainwindow.py b/openlp/core/ui/mainwindow.py index 87077820b..21dc4b67a 100644 --- a/openlp/core/ui/mainwindow.py +++ b/openlp/core/ui/mainwindow.py @@ -851,5 +851,8 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow): if filename and filename not in self.recentFiles: self.recentFiles.insert(0, QtCore.QString(filename)) while self.recentFiles.count() > recentFileCount: - self.recentFiles.removeLast() + if isinstance(self.recentFiles, QtCore.QStringList): + self.recentFiles.removeLast() + else: + self.recentFiles.pop()