[LyX/master] Open backup files via file open dialog

Scott Kostyshak skostysh at lyx.org
Thu May 20 17:16:01 UTC 2021


commit c6c6576515a497ec7241ecfb7e34c4f7df17e4c4
Author: Daniel Ramoeller <d.lyx at web.de>
Date:   Tue Apr 27 20:40:53 2021 +0200

    Open backup files via file open dialog
    
    Fix for bug #12266.
    
    Also: Option to open any files as is standard in other apps.
---
 src/frontends/qt/GuiView.cpp |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/frontends/qt/GuiView.cpp b/src/frontends/qt/GuiView.cpp
index d6e9a85..3a6a04c 100644
--- a/src/frontends/qt/GuiView.cpp
+++ b/src/frontends/qt/GuiView.cpp
@@ -2610,7 +2610,11 @@ void GuiView::openDocument(string const & fname)
 		dlg.setButton1(qt_("D&ocuments"), toqstr(lyxrc.document_path));
 		dlg.setButton2(qt_("&Examples"), toqstr(lyxrc.example_path));
 
-		QStringList const filter(qt_("LyX Documents (*.lyx)"));
+		QStringList const filter({
+				qt_("LyX Documents (*.lyx)"),
+				qt_("LyX Document Backups (*.lyx~)"),
+				qt_("All Files (*.*)")
+		});
 		FileDialog::Result result =
 			dlg.open(toqstr(initpath), filter);
 


More information about the lyx-cvs mailing list