mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-10 18:58:10 +00:00
fix bug 5332: preferences opens wrong folder for keyboard maps when there is no valid map
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26748 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
e20c1520cc
commit
9229214eea
@ -96,11 +96,14 @@ QString browseFile(QString const & filename,
|
|||||||
QString const & label1 = QString(),
|
QString const & label1 = QString(),
|
||||||
QString const & dir1 = QString(),
|
QString const & dir1 = QString(),
|
||||||
QString const & label2 = QString(),
|
QString const & label2 = QString(),
|
||||||
QString const & dir2 = QString())
|
QString const & dir2 = QString(),
|
||||||
|
QString const & fallback_dir = QString())
|
||||||
{
|
{
|
||||||
QString lastPath = ".";
|
QString lastPath = ".";
|
||||||
if (!filename.isEmpty())
|
if (!filename.isEmpty())
|
||||||
lastPath = onlyPath(filename);
|
lastPath = onlyPath(filename);
|
||||||
|
else if(!fallback_dir.isEmpty())
|
||||||
|
lastPath = fallback_dir;
|
||||||
|
|
||||||
FileDialog dlg(title, LFUN_SELECT_FILE_SYNC);
|
FileDialog dlg(title, LFUN_SELECT_FILE_SYNC);
|
||||||
dlg.setButton2(label1, dir1);
|
dlg.setButton2(label1, dir1);
|
||||||
@ -139,7 +142,7 @@ QString browseLibFile(QString const & dir,
|
|||||||
|
|
||||||
QString const result = browseFile(toqstr(
|
QString const result = browseFile(toqstr(
|
||||||
libFileSearch(dir, name, ext).absFilename()),
|
libFileSearch(dir, name, ext).absFilename()),
|
||||||
title, filters, false, dir1, dir2);
|
title, filters, false, dir1, dir2, QString(), QString(), dir1);
|
||||||
|
|
||||||
// remove the extension if it is the default one
|
// remove the extension if it is the default one
|
||||||
QString noextresult;
|
QString noextresult;
|
||||||
|
Loading…
Reference in New Issue
Block a user