From: Alfredo Braunstein Date: Wed, 5 Sep 2007 13:52:43 +0000 (+0000) Subject: (InsetCollapsable::draw) restore background color (avoid psychedelic effects when... X-Git-Tag: 1.6.10~8493 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=8158e25ab76608821ced120bee4536fb6a2de8cd;p=features.git (InsetCollapsable::draw) restore background color (avoid psychedelic effects when selecting a note) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20069 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/insets/InsetCollapsable.cpp b/src/insets/InsetCollapsable.cpp index 826b2a3c5a..c634092c02 100644 --- a/src/insets/InsetCollapsable.cpp +++ b/src/insets/InsetCollapsable.cpp @@ -244,8 +244,9 @@ bool InsetCollapsable::setMouseHover(bool mouse_hover) void InsetCollapsable::draw(PainterInfo & pi, int x, int y) const { autoOpen_ = pi.base.bv->cursor().isInside(this); + int const old_color = pi.background_color; pi.background_color = backgroundColor(); - const int xx = x + TEXT_TO_INSET_OFFSET; + int const xx = x + TEXT_TO_INSET_OFFSET; // Draw button first -- top, left or only Dimension dimc = dimensionCollapsed(); @@ -352,6 +353,7 @@ void InsetCollapsable::draw(PainterInfo & pi, int x, int y) const break; } setPosCache(pi, x, y); + pi.background_color = old_color; }