From 7c8510f02e1b33fb62ef1414aa848ec4ce7efe00 Mon Sep 17 00:00:00 2001 From: Vincent van Ravesteijn Date: Thu, 11 Mar 2010 18:20:57 +0000 Subject: [PATCH] Fix bug #6563: Change tracking and moving labels Do not warn that a label already exists if it is in a deleted part of the document. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33714 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/Buffer.cpp | 3 ++- src/insets/InsetLabel.cpp | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Buffer.cpp b/src/Buffer.cpp index eededacba2..5236a627ac 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -3854,7 +3854,8 @@ void Buffer::updateBuffer(ParIterator & parit, UpdateType utype) const InsetList::const_iterator end = parit->insetList().end(); for (; iit != end; ++iit) { parit.pos() = iit->pos; - iit->inset->updateBuffer(parit, utype); + if (!parit->isDeleted(iit->pos)) + iit->inset->updateBuffer(parit, utype); } } } diff --git a/src/insets/InsetLabel.cpp b/src/insets/InsetLabel.cpp index 7edd1aaca8..8ea19e4306 100644 --- a/src/insets/InsetLabel.cpp +++ b/src/insets/InsetLabel.cpp @@ -50,7 +50,9 @@ namespace lyx { InsetLabel::InsetLabel(Buffer * buf, InsetCommandParams const & p) : InsetCommand(buf, p, "label") -{} +{ + screen_label_ = p["name"]; +} void InsetLabel::initView() @@ -101,6 +103,7 @@ void InsetLabel::updateCommand(docstring const & new_label, bool updaterefs) // We need an update of the Buffer reference cache. This is achieved by // updateBuffer(). buffer().updateBuffer(); + screen_label_ = label; }