forked from openlp/openlp
HEAD
This commit is contained in:
commit
ba0a4bb827
@ -1312,7 +1312,6 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
settings.value(u'preview splitter geometry').toByteArray())
|
settings.value(u'preview splitter geometry').toByteArray())
|
||||||
self.controlSplitter.restoreState(
|
self.controlSplitter.restoreState(
|
||||||
settings.value(u'mainwindow splitter geometry').toByteArray())
|
settings.value(u'mainwindow splitter geometry').toByteArray())
|
||||||
|
|
||||||
settings.endGroup()
|
settings.endGroup()
|
||||||
|
|
||||||
def saveSettings(self):
|
def saveSettings(self):
|
||||||
@ -1388,6 +1387,12 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
maxRecentFiles = QtCore.QSettings().value(u'advanced/max recent files',
|
maxRecentFiles = QtCore.QSettings().value(u'advanced/max recent files',
|
||||||
QtCore.QVariant(20)).toInt()[0]
|
QtCore.QVariant(20)).toInt()[0]
|
||||||
if filename:
|
if filename:
|
||||||
|
# Add some cleanup to reduce duplication in the recent file list
|
||||||
|
filename = os.path.abspath(filename)
|
||||||
|
# abspath() only capitalises the drive letter if it wasn't provided
|
||||||
|
# in the given filename which then causes duplication.
|
||||||
|
if filename[1:3] == ':\\':
|
||||||
|
filename = filename[0].upper() + filename[1:]
|
||||||
position = self.recentFiles.indexOf(filename)
|
position = self.recentFiles.indexOf(filename)
|
||||||
if position != -1:
|
if position != -1:
|
||||||
self.recentFiles.removeAt(position)
|
self.recentFiles.removeAt(position)
|
||||||
|
Loading…
Reference in New Issue
Block a user