From: Scott Kostyshak Date: Fri, 19 Apr 2013 11:48:15 +0000 (-0400) Subject: GuiRef: do not hide labels that start with ':' X-Git-Tag: 2.1.0beta1~360 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=647ae51a462fdb8d5256fde65596695e7611e2ff;p=lyx.git GuiRef: do not hide labels that start with ':' If a label starts with ':' and 'Group' is checked, the label is now shown under "" instead of not shown. Note that labels starting with ':' can be valid in LaTeX. --- diff --git a/src/frontends/qt4/GuiRef.cpp b/src/frontends/qt4/GuiRef.cpp index 9e64750486..15e6583623 100644 --- a/src/frontends/qt4/GuiRef.cpp +++ b/src/frontends/qt4/GuiRef.cpp @@ -392,11 +392,11 @@ void GuiRef::redoRefs() QString const ref = refsStrings.at(i); if ((ref.startsWith(cat + QString(":"))) || (cat == qt_("") - && !ref.contains(":"))) { - QTreeWidgetItem * child = - new QTreeWidgetItem(item); - child->setText(0, ref); - item->addChild(child); + && (!ref.mid(1).contains(":") || ref.left(1).contains(":")))) { + QTreeWidgetItem * child = + new QTreeWidgetItem(item); + child->setText(0, ref); + item->addChild(child); } } refsCats.append(item);