[LyX/2.3.x] Re-enable input of non-LyX files (e.g., tex, pgf) (#12056)
Juergen Spitzmueller
spitz at lyx.org
Mon Dec 28 17:53:50 UTC 2020
commit 17e4f325f3d216591ab519309e5e044c7e319e33
Author: Juergen Spitzmueller <spitz at lyx.org>
Date: Mon Dec 28 09:58:30 2020 +0100
Re-enable input of non-LyX files (e.g., tex, pgf) (#12056)
This amends [a385b7dc2b58/lyxgit]
(cherry picked from commit 2af8e661a3a7652f31bbef4890a4b9290bf0febd)
---
src/frontends/qt4/GuiInclude.cpp | 11 +++++++----
status.23x | 2 ++
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/frontends/qt4/GuiInclude.cpp b/src/frontends/qt4/GuiInclude.cpp
index d713ef2..5dc776c 100644
--- a/src/frontends/qt4/GuiInclude.cpp
+++ b/src/frontends/qt4/GuiInclude.cpp
@@ -317,14 +317,17 @@ bool GuiInclude::isValid()
okPB->setText(qt_("&OK"));
return true;
}
+
+ 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))) {
okPB->setText(qt_("&OK"));
- return false;
+ return absfname.exists();
}
- string const bpath = buffer().filePath();
- // Path might be relative to current Buffer, so make absolute
- FileName const absfname = support::makeAbsPath(fromqstr(fname), bpath);
+
// Set OK button text according to whether file already exists
okPB->setText(absfname.exists() ? qt_("&OK") : qt_("&Create"));
// enable edit button iff file is open in some Buffer
diff --git a/status.23x b/status.23x
index d9a0b10..3fbb0d7 100644
--- a/status.23x
+++ b/status.23x
@@ -53,6 +53,8 @@ What's new
* USER INTERFACE
+- Re-enable input of non-LyX files (e.g., tex, pgf) (bug 12056).
+
- Fix problem with display of menus on Gnome Wayland (bug 11746).
- Improve error message for VCS file registration when RCS package
More information about the lyx-cvs
mailing list