]> git.lyx.org Git - lyx.git/commitdiff
Open backup files via file open dialog
authorDaniel Ramoeller <d.lyx@web.de>
Tue, 27 Apr 2021 18:40:53 +0000 (20:40 +0200)
committerScott Kostyshak <skostysh@lyx.org>
Thu, 20 May 2021 17:24:37 +0000 (13:24 -0400)
Fix for bug #12266.

Also: Option to open any files as is standard in other apps.

src/frontends/qt/GuiView.cpp

index d6e9a8522515353220efbecc3493cb42f3d0da0f..3a6a04c3bfa48cd4282a6120b548d18c82131d7b 100644 (file)
@@ -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);