]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetQuotes.cpp
Fix crash after undo following replacement of a multicell selection (#8973).
[lyx.git] / src / insets / InsetQuotes.cpp
index 8586ce18d5372382689ae1cbcacbb93ddede55f5..70911fd65940f7dcfcbbe40968fa10ca5a3a2003 100644 (file)
@@ -230,14 +230,15 @@ void InsetQuotes::draw(PainterInfo & pi, int x, int y) const
 {
        // FIXME: should we add a language or a font parameter member?
        docstring const text = displayString();
-
+       FontInfo font = pi.base.font;
+       font.setPaintColor(pi.textColor(font.realColor()));
        if (text.length() == 2 && text[0] == text[1]) {
-               pi.pain.text(x, y, text[0], pi.base.font);
-               int const t = theFontMetrics(pi.base.font)
+               pi.pain.text(x, y, text[0], font);
+               int const t = theFontMetrics(font)
                        .width(',');
-               pi.pain.text(x + t, y, text[0], pi.base.font);
+               pi.pain.text(x + t, y, text[0], font);
        } else {
-               pi.pain.text(x, y, text, pi.base.font);
+               pi.pain.text(x, y, text, font);
        }
 }
 
@@ -297,7 +298,8 @@ void InsetQuotes::latex(otexstream & os, OutputParams const & runparams) const
 }
 
 
-int InsetQuotes::plaintext(odocstream & os, OutputParams const &) const
+int InsetQuotes::plaintext(odocstringstream & os, 
+        OutputParams const &, size_t) const
 {
        docstring const str = displayString();
        os << str;