The branch, master, has been updated.

- Log -----------------------------------------------------------------

commit 361995459068a5e53b597f1195f7f29522714ec4
Author: Vincent van Ravesteijn <[email protected]>
Date:   Sun Apr 28 21:47:37 2013 +0200

    Fix assertion for InsetInfos of icon types
    
    InsetInfo inserted insets in its text without specifying a font. This
    caused the fonlist to be incomplete and firing the assertion.

diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp
index 6fc44a0..be95509 100644
--- a/src/Paragraph.cpp
+++ b/src/Paragraph.cpp
@@ -767,7 +767,7 @@ void Paragraph::Private::insertChar(pos_type pos, char_type 
c,
 
 
 bool Paragraph::insertInset(pos_type pos, Inset * inset,
-                                  Change const & change)
+                           Font const & font, Change const & change)
 {
        LASSERT(inset, return false);
        LASSERT(pos >= 0 && pos <= size(), return false);
@@ -785,6 +785,8 @@ bool Paragraph::insertInset(pos_type pos, Inset * inset,
 
        // Some insets require run of spell checker
        requestSpellCheck(pos);
+
+       setFont(pos, font);
        return true;
 }
 
@@ -1783,12 +1785,10 @@ void Paragraph::insertChar(pos_type pos, char_type c,
 
 
 bool Paragraph::insertInset(pos_type pos, Inset * inset,
-                           Font const & font, Change const & change)
+                           Change const & change)
 {
-       bool const success = insertInset(pos, inset, change);
-       // Set the font/language of the inset...
-       setFont(pos, font);
-       return success;
+       Font no_font;
+       return insertInset(pos, inset, no_font, change);
 }
 
 

-----------------------------------------------------------------------

Summary of changes:
 src/Paragraph.cpp |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
The LyX Source Repository

Reply via email to