From: Jürgen Spitzmüller Date: Tue, 29 May 2007 17:02:29 +0000 (+0000) Subject: Fix bug 2555: X-Git-Tag: 1.6.10~9577 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=ac45b49fb97447495d356b0096f6f5599628c272;p=features.git 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 --- 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); } } }