+ if (it->first->lyxCode() == MATH_REF_CODE)
+ toc.push_back(TocItem(ref_pit, 1,
+ static_cast<InsetMathHull *>(it->first)->asRefInset()
+ ->screenLabel()));
+ else
+ toc.push_back(TocItem(ref_pit, 1,
+ static_cast<InsetRef *>(it->first)->screenLabel()));
+ }
+}
+
+
+bool InsetLabel::getStatus(Cursor & cur, FuncRequest const & cmd,
+ FuncStatus & status) const
+{
+ bool enabled;
+ switch (cmd.action()) {
+ case LFUN_LABEL_INSERT_AS_REF:
+ case LFUN_LABEL_COPY_AS_REF:
+ enabled = true;
+ break;
+ default:
+ return InsetCommand::getStatus(cur, cmd, status);