]> git.lyx.org Git - features.git/commitdiff
Fix bug 2555:
authorJürgen Spitzmüller <spitz@lyx.org>
Tue, 29 May 2007 17:02:29 +0000 (17:02 +0000)
committerJürgen Spitzmüller <spitz@lyx.org>
Tue, 29 May 2007 17:02:29 +0000 (17:02 +0000)
* 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

index ef0c3db4644866654fe4d0b5f5049e0f8d7df566..6bc12fc156951b6f96672606dc3bb9af65398a51 100644 (file)
@@ -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);
                }
        }
 }