summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2011-05-20 09:47:43 +0000
committerNoel Power <noel.power@novell.com>2011-05-20 11:12:12 +0100
commit6a5fc45bb00dbe99b257be2aa5a81deeb6ced1ca (patch)
tree1f535135f1061b9d62a59e6e5adea901368bb4ae
parentf71529593fc6e16554602638d100d02ac03bee75 (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>
-rw-r--r--vcl/source/control/button.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index c77d14aeb8..6932cdbaa5 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();