]> git.lyx.org Git - features.git/commitdiff
Do not close LyXFiles dialog on double-clicking header
authorJuergen Spitzmueller <spitz@lyx.org>
Wed, 20 Mar 2019 11:37:55 +0000 (12:37 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Wed, 20 Mar 2019 11:37:55 +0000 (12:37 +0100)
src/frontends/qt4/GuiLyXFiles.cpp

index 978a21df1a90034bbea0196ed8ece26c2c2e3b23..95b5ef217142550f8fe42752dfb380bce850c7b4 100644 (file)
@@ -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();