Fix assertion in trunk, and add a comment about why this needs to

be done twice.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29085 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2009-04-04 13:48:30 +00:00
parent a9c466ae2f
commit 1352592874

View File

@ -221,8 +221,12 @@ pasteSelectionHelper(Cursor & cur, ParagraphList const & parlist,
InsetIterator const i_end = inset_iterator_end(in);
for (InsetIterator it = inset_iterator_begin(in); it != i_end; ++it) {
// Even though this will also be done later, it has to be done here
// since, e.g., InsetLabel::updateCommand() is going to try to access
// the buffer() member.
it->setBuffer(const_cast<Buffer &>(buffer));
switch (it->lyxCode()) {
case LABEL_CODE: {
// check for duplicates
InsetCommand & lab = static_cast<InsetCommand &>(*it);