[Libreoffice-commits] .: Branch 'libreoffice-3-4' - vcl/source

Noel Power noelp at kemper.freedesktop.org
Fri May 20 02:51:44 PDT 2011


 vcl/source/control/button.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 829d4abd5eda9b03c5d4518f43efc4444bc63935
Author: Noel Power <noel.power at novell.com>
Date:   Fri May 20 10:47:43 2011 +0100

    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>

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