]> git.lyx.org Git - features.git/commitdiff
Fix bug #7667: Pixmap cache and CT lead to random colors
authorVincent van Ravesteijn <vfr@lyx.org>
Sun, 29 Apr 2012 12:26:24 +0000 (14:26 +0200)
committerVincent van Ravesteijn <vfr@lyx.org>
Sun, 29 Apr 2012 12:59:19 +0000 (14:59 +0200)
The signature of the character in cache should take into account the
change tracking baseColor (author) and mergeColor (added/deleted). If not,
we will mixup different cached pixmaps.

src/frontends/qt4/GuiPainter.cpp

index 3ade5c918857c680433f94051ff31c64b772d5db..5cb43a039b79df9117a024a13bd3f6d87d563dbf 100644 (file)
@@ -96,7 +96,9 @@ QString GuiPainter::generateStringSignature(QString const & str, FontInfo const
        sig.append(QChar(static_cast<short>(f.series())));
        sig.append(QChar(static_cast<short>(f.realShape())));
        sig.append(QChar(static_cast<short>(f.size())));
-       sig.append(QChar(static_cast<short>(f.color())));
+       Color const & color = f.realColor();
+       sig.append(QChar(static_cast<short>(color.baseColor)));
+       sig.append(QChar(static_cast<short>(color.mergeColor)));
        if (!monochrome_min_.empty()) {
                QColor const & min = monochrome_min_.top();
                QColor const & max = monochrome_max_.top();