]> git.lyx.org Git - lyx.git/commitdiff
Do not attempt to show module info for category headers
authorJuergen Spitzmueller <spitz@lyx.org>
Sun, 7 Apr 2019 11:57:41 +0000 (13:57 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Sun, 7 Apr 2019 11:57:41 +0000 (13:57 +0200)
src/frontends/qt4/GuiDocument.cpp

index cf8d999358306eb811fdf3e28637e3ad2c96ec2f..26ffc95744bddc63337d96578f4abfb5fe93b7f8 100644 (file)
@@ -2972,6 +2972,14 @@ void GuiDocument::updateModuleInfo()
                return;
        }
        QModelIndex const & idx = lv->selectionModel()->currentIndex();
+
+       if (!focus_on_selected
+           && modules_av_model_.itemFromIndex(idx)->hasChildren()) {
+               // This is a category header
+               modulesModule->infoML->document()->clear();
+               return;
+       }
+
        string const modName = focus_on_selected ?
                                modules_sel_model_.getIDString(idx.row())
                              : fromqstr(modules_av_model_.data(idx, Qt::UserRole).toString());