From ac45b49fb97447495d356b0096f6f5599628c272 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrgen=20Spitzm=C3=BCller?= Date: Tue, 29 May 2007 17:02:29 +0000 Subject: [PATCH] Fix bug 2555: * src/Text2.cpp: - (setFont): set font of inset as well, not only content - (setCharFont): remove obsolete assert git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18563 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/Text2.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/Text2.cpp b/src/Text2.cpp index ef0c3db464..6bc12fc156 100644 --- a/src/Text2.cpp +++ b/src/Text2.cpp @@ -270,9 +270,6 @@ Font Text::getLabelFont(Buffer const & buffer, Paragraph const & par) const void Text::setCharFont(Buffer const & buffer, pit_type pit, pos_type pos, Font const & fnt) { - BOOST_ASSERT(!pars_[pit].isInset(pos) || - !pars_[pit].getInset(pos)->noFontChange()); - Font font = fnt; Layout_ptr const & layout = pars_[pit].layout(); @@ -519,13 +516,11 @@ void Text::setFont(Buffer const & buffer, DocIterator const & begin, // We need to propagate the font change to all // text cells of the inset (bug 1973). // FIXME: This should change, see documentation - // of noFontChange in insetbase.h + // of noFontChange in Inset.h setInsetFont(buffer, pit, pos, font, toggleall); - else { - Font f = getFont(buffer, dit.paragraph(), pos); - f.update(font, language, toggleall); - setCharFont(buffer, pit, pos, f); - } + Font f = getFont(buffer, dit.paragraph(), pos); + f.update(font, language, toggleall); + setCharFont(buffer, pit, pos, f); } } } -- 2.39.5