[Libreoffice-commits] .: Branch 'libreoffice-3-4-0' - vcl/source
Jan Holesovsky
kendy at kemper.freedesktop.org
Fri May 20 03:26:48 PDT 2011
vcl/source/control/button.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 70c7807a17571a57934483c78d97a20350a43a12
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Fri May 20 09:47:43 2011 +0000
fdo#36690: Don't broadcast setting changes during painting of button.
Calling SetSettings() when the output device is Window causes it to
broadcast data change. PushButton::Draw() in fact calls this method
when the button contains colors, which ends up broadcasting its change
via Window::DataChanged call. But depending on the output device
this DataChanged call may end up painting it again, which basically
causes a recursive loop.
The solution is to make sure OutputDevice::SetSettings() is called ( which only
changes the settings without doing anything else ) and *not* and derived
classes 'SetSettings()' method
Signed-off-by: Noel Power <noel.power at novell.com>
Signed-off-by: Michael Meeks <michael.meeks at novell.com>
Signed-off-by: Jan Holesovsky <kendy at suse.cz>
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index c77d14a..6932cdb 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -1522,7 +1522,7 @@ void PushButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
else
aStyleSettings.SetFaceColor( GetSettings().GetStyleSettings().GetFaceColor() );
aSettings.SetStyleSettings( aStyleSettings );
- pDev->SetSettings( aSettings );
+ pDev->OutputDevice::SetSettings( aSettings );
}
pDev->SetTextFillColor();
More information about the Libreoffice-commits
mailing list