mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-11 11:08:41 +00:00
Fix bug #5980: 'Maximum last files' setting doesn't go beyond 9.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30009 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
d86c68f1fa
commit
46dcc4fcd0
@ -42,6 +42,7 @@
|
|||||||
#include "LyXAction.h"
|
#include "LyXAction.h"
|
||||||
#include "LyX.h" // for lastfiles
|
#include "LyX.h" // for lastfiles
|
||||||
#include "LyXFunc.h"
|
#include "LyXFunc.h"
|
||||||
|
#include "LyXRC.h"
|
||||||
#include "Paragraph.h"
|
#include "Paragraph.h"
|
||||||
#include "ParIterator.h"
|
#include "ParIterator.h"
|
||||||
#include "Session.h"
|
#include "Session.h"
|
||||||
@ -748,12 +749,17 @@ void MenuDefinition::expandLastfiles()
|
|||||||
LastFilesSection::LastFiles const & lf = theSession().lastFiles().lastFiles();
|
LastFilesSection::LastFiles const & lf = theSession().lastFiles().lastFiles();
|
||||||
LastFilesSection::LastFiles::const_iterator lfit = lf.begin();
|
LastFilesSection::LastFiles::const_iterator lfit = lf.begin();
|
||||||
|
|
||||||
int ii = 1;
|
unsigned int ii = 1;
|
||||||
|
|
||||||
for (; lfit != lf.end() && ii < 10; ++lfit, ++ii) {
|
for (; lfit != lf.end() && ii <= lyxrc.num_lastfiles; ++lfit, ++ii) {
|
||||||
string const file = lfit->absFilename();
|
string const file = lfit->absFilename();
|
||||||
QString const label = QString("%1. %2|%3").arg(ii)
|
QString label;
|
||||||
.arg(toqstr(makeDisplayPath(file, 30))).arg(ii);
|
if (ii < 10)
|
||||||
|
label = QString("%1. %2|%3").arg(ii)
|
||||||
|
.arg(toqstr(makeDisplayPath(file, 30))).arg(ii);
|
||||||
|
else
|
||||||
|
label = QString("%1. %2").arg(ii)
|
||||||
|
.arg(toqstr(makeDisplayPath(file, 30)));
|
||||||
add(MenuItem(MenuItem::Command, label, FuncRequest(LFUN_FILE_OPEN, file)));
|
add(MenuItem(MenuItem::Command, label, FuncRequest(LFUN_FILE_OPEN, file)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user