diff options
author | Kohei Yoshida <kyoshida@novell.com> | 2011-05-20 09:47:43 +0000 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2011-05-20 12:25:16 +0200 |
commit | 304828eaf3164e2c698e2fe523c011f72412c4bd (patch) | |
tree | eba61072ff78fb6d5f1eac501803fc5a6c348884 | |
parent | e3b7881e8c94313e6b78c8d6d27239bd5c7e91bd (diff) |
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@novell.com>
Signed-off-by: Michael Meeks <michael.meeks@novell.com>
Signed-off-by: Jan Holesovsky <kendy@suse.cz>
-rw-r--r-- | vcl/source/control/button.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index 7926ee339bc7..3067f6e6da5c 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(); |