Open backup files via file open dialog

Fix for bug #12266.

Also: Option to open any files as is standard in other apps.
This commit is contained in:
Daniel Ramoeller 2021-04-27 20:40:53 +02:00 committed by Scott Kostyshak
parent 67c85f54c4
commit c6c6576515

View File

@ -2610,7 +2610,11 @@ void GuiView::openDocument(string const & fname)
dlg.setButton1(qt_("D&ocuments"), toqstr(lyxrc.document_path)); dlg.setButton1(qt_("D&ocuments"), toqstr(lyxrc.document_path));
dlg.setButton2(qt_("&Examples"), toqstr(lyxrc.example_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 = FileDialog::Result result =
dlg.open(toqstr(initpath), filter); dlg.open(toqstr(initpath), filter);