From: Juergen Spitzmueller Date: Sun, 7 Apr 2019 11:57:41 +0000 (+0200) Subject: Do not attempt to show module info for category headers X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=27c0d1973f92243b2f2bbd14b8f5ffec0d232b9c;p=features.git Do not attempt to show module info for category headers --- diff --git a/src/frontends/qt4/GuiDocument.cpp b/src/frontends/qt4/GuiDocument.cpp index cf8d999358..26ffc95744 100644 --- a/src/frontends/qt4/GuiDocument.cpp +++ b/src/frontends/qt4/GuiDocument.cpp @@ -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());