]> git.lyx.org Git - features.git/commitdiff
Fix bug http://bugzilla.lyx.org/show_bug.cgi?id=5423
authorAbdelrazak Younes <younes@lyx.org>
Tue, 28 Oct 2008 17:41:56 +0000 (17:41 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Tue, 28 Oct 2008 17:41:56 +0000 (17:41 +0000)
This regression was introduced by at r26957, sorry about that.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27168 a592a061-630c-0410-9148-cb99ea01b6c8

src/paragraph_funcs.cpp

index e59e4a5909ef05df2e6b0d6a512ed0a920a37c61..a11d72550e48f113195b2a641e66eceec5490bb1 100644 (file)
@@ -36,8 +36,9 @@ static bool moveItem(Paragraph & fromPar, pos_type fromPos,
        // Note: moveItem() does not honour change tracking!
        // Therefore, it should only be used for breaking and merging paragraphs
 
-       Font const & tmpFont = fromPar.getFontSettings(params, fromPos);
-       Change const & tmpChange = fromPar.lookupChange(fromPos);
+       // We need a copy here because the character at fromPos is going to be erased.
+       Font const tmpFont = fromPar.getFontSettings(params, fromPos);
+       Change const tmpChange = fromPar.lookupChange(fromPos);
 
        if (Inset * tmpInset = fromPar.getInset(fromPos)) {
                fromPar.releaseInset(fromPos);