From 070d75f1c635ad326b2d58642dc4e119f84a3faa Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Tue, 28 Oct 2008 17:51:08 +0000 Subject: [PATCH] revert hazardous part of r26957 and add a comment. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27169 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/CutAndPaste.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CutAndPaste.cpp b/src/CutAndPaste.cpp index 2f1a715d08..5a0ecbb09c 100644 --- a/src/CutAndPaste.cpp +++ b/src/CutAndPaste.cpp @@ -914,8 +914,8 @@ void replaceSelectionWithString(Cursor & cur, docstring const & str, bool backwa cur.recordUndo(); DocIterator selbeg = cur.selectionBegin(); - // Get font setting before we cut - Font const & font = + // Get font setting before we cut, we need a copy here, not a bare reference. + Font const font = selbeg.paragraph().getFontSettings(cur.buffer().params(), selbeg.pos()); // Insert the new string -- 2.39.2