]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiRef.cpp
Use <cstdint> instead of <boost/cstdint.hpp>
[lyx.git] / src / frontends / qt4 / GuiRef.cpp
index 6ccb8ef6c46ec49710113598110af68e8a242b27..0c6b12d46214fcd56f14a449c7335e93113c0416 100644 (file)
@@ -145,10 +145,10 @@ void GuiRef::enableView(bool enable)
 
 void GuiRef::enableBoxes()
 {
-       bool const isFormatted =
-           (InsetRef::getName(typeCO->currentIndex()) == "formatted");
-       bool const isLabelOnly =
-           (InsetRef::getName(typeCO->currentIndex()) == "labelonly");
+       QString const reftype =
+               typeCO->itemData(typeCO->currentIndex()).toString();
+       bool const isFormatted = (reftype == "formatted");
+       bool const isLabelOnly = (reftype == "labelonly");
        bool const usingRefStyle = buffer().params().use_refstyle;
        pluralCB->setEnabled(isFormatted && usingRefStyle);
        capsCB->setEnabled(isFormatted && usingRefStyle);
@@ -328,9 +328,9 @@ void GuiRef::updateContents()
        typeCO->addItem(qt_("<page>"), "pageref");
        typeCO->addItem(qt_("on page <page>"), "vpageref");
        typeCO->addItem(qt_("<reference> on page <page>"), "vref");
+       typeCO->addItem(qt_("Textual reference"), "nameref");
        if (bufferview()->cursor().inTexted()) {
                typeCO->addItem(qt_("Formatted reference"), "formatted");
-               typeCO->addItem(qt_("Textual reference"), "nameref");
                typeCO->addItem(qt_("Label only"), "labelonly");
        } else
                typeCO->addItem(qt_("Formatted reference"), "prettyref");