docstring InsetLabel::screenLabel() const
{
docstring InsetLabel::screenLabel() const
{
- return getParam("name");
}
void InsetLabel::updateLabels(ParIterator const &)
{
docstring const & label = getParam("name");
}
void InsetLabel::updateLabels(ParIterator const &)
{
docstring const & label = getParam("name");
- if (buffer().insetLabel(label))
+ if (buffer().insetLabel(label)) {
// Problem: We already have an InsetLabel with the same name!
// Problem: We already have an InsetLabel with the same name!
+ screen_label_ = _("DUPLICATE: ") + label;
buffer().setInsetLabel(label, this);
buffer().setInsetLabel(label, this);
docstring const & label = getParam("name");
Toc & toc = buffer().tocBackend().toc("label");
if (buffer().insetLabel(label) != this) {
docstring const & label = getParam("name");
Toc & toc = buffer().tocBackend().toc("label");
if (buffer().insetLabel(label) != this) {
- toc.push_back(TocItem(cpit, 0, _("DUPLICATE: ") + label));
+ toc.push_back(TocItem(cpit, 0, screen_label_));
- toc.push_back(TocItem(cpit, 0, label));
+ toc.push_back(TocItem(cpit, 0, screen_label_));
Buffer::References const & refs = buffer().references(label);
Buffer::References::const_iterator it = refs.begin();
Buffer::References::const_iterator end = refs.end();
Buffer::References const & refs = buffer().references(label);
Buffer::References::const_iterator it = refs.begin();
Buffer::References::const_iterator end = refs.end();
private:
///
Inset * clone() const { return new InsetLabel(*this); }
private:
///
Inset * clone() const { return new InsetLabel(*this); }
+ ///
+ docstring screen_label_;