From: Juergen Spitzmueller Date: Wed, 20 Mar 2019 11:37:55 +0000 (+0100) Subject: Do not close LyXFiles dialog on double-clicking header X-Git-Tag: lyx-2.4.0dev-acb2ca7b~2428 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=f3ee82fb8790ac3800a12f847210ced909d44e31;p=features.git Do not close LyXFiles dialog on double-clicking header --- 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();