]> git.lyx.org Git - lyx.git/blobdiff - src/rowpainter.cpp
Fix bug 4463. The crash was due to a call to X from inside a child process.
[lyx.git] / src / rowpainter.cpp
index cd19b72389b3d7903cb01be77046c11e6ed2422c..dc0ed5f1cccb42fda054d70086308b5bffc25f25 100644 (file)
@@ -96,6 +96,10 @@ void RowPainter::paintInset(Inset const * inset, pos_type const pos)
        Font const font = text_metrics_.getDisplayFont(pit_, pos);
 
        BOOST_ASSERT(inset);
+       // Backup full_repaint status because some insets (InsetTabular)
+       // requires a full repaint
+       bool pi_full_repaint = pi_.full_repaint;
+
        // FIXME: We should always use font, see documentation of
        // noFontChange() in Inset.h.
        pi_.base.font = inset->noFontChange() ?
@@ -114,6 +118,9 @@ void RowPainter::paintInset(Inset const * inset, pos_type const pos)
 
        x_ += dim.width();
 
+       // Restore full_repaint status.
+       pi_.full_repaint = pi_full_repaint;
+
 #ifdef DEBUG_METRICS
        int const x1 = int(x_ - dim.width());
        Dimension dim2;