mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Re-enable input of non-LyX files (e.g., tex, pgf) (#12056)
This amends [a385b7dc2b58/lyxgit]
This commit is contained in:
parent
b53b44266a
commit
2af8e661a3
@ -318,14 +318,17 @@ bool GuiInclude::isValid()
|
||||
okbutton->setText(qt_("&OK"));
|
||||
return true;
|
||||
}
|
||||
// Do we have a LyX filename?
|
||||
if (!isLyXFileName(fromqstr(fname))) {
|
||||
okbutton->setText(qt_("&OK"));
|
||||
return false;
|
||||
}
|
||||
|
||||
string const bpath = buffer().filePath();
|
||||
// Path might be relative to current Buffer, so make absolute
|
||||
FileName const absfname = support::makeAbsPath(fromqstr(fname), bpath);
|
||||
|
||||
// Do we have a LyX filename?
|
||||
if (!isLyXFileName(fromqstr(fname))) {
|
||||
okbutton->setText(qt_("&OK"));
|
||||
return absfname.exists();
|
||||
}
|
||||
|
||||
// Set OK button text according to whether file already exists
|
||||
okbutton->setText(absfname.exists() ? qt_("&OK") : qt_("&Create"));
|
||||
// enable edit button iff file is open in some Buffer
|
||||
|
Loading…
Reference in New Issue
Block a user