From f3ee82fb8790ac3800a12f847210ced909d44e31 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Wed, 20 Mar 2019 12:37:55 +0100 Subject: [PATCH] Do not close LyXFiles dialog on double-clicking header --- src/frontends/qt4/GuiLyXFiles.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/frontends/qt4/GuiLyXFiles.cpp b/src/frontends/qt4/GuiLyXFiles.cpp index 978a21df1a..95b5ef2171 100644 --- a/src/frontends/qt4/GuiLyXFiles.cpp +++ b/src/frontends/qt4/GuiLyXFiles.cpp @@ -233,8 +233,12 @@ void GuiLyXFiles::on_languageCO_activated(int) } -void GuiLyXFiles::on_filesLW_itemDoubleClicked(QTreeWidgetItem *, int) +void GuiLyXFiles::on_filesLW_itemDoubleClicked(QTreeWidgetItem * item, int) { + if (!item->data(0, Qt::UserRole).toString().endsWith(getSuffix())) + // not a file (probably a header) + return; + applyView(); dispatchParams(); close(); -- 2.39.2