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);
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");