summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/source/control/button.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 3c028ea809ec..9e4bdc2763ba 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: button.cxx,v $
- * $Revision: 1.61 $
+ * $Revision: 1.62 $
*
* This file is part of OpenOffice.org.
*
@@ -1754,6 +1754,11 @@ void PushButton::StateChanged( StateChangedType nType )
{
SetStyle( ImplInitStyle( GetWindow( WINDOW_PREV ), GetStyle() ) );
+ bool bIsDefButton = ( GetStyle() & WB_DEFBUTTON ) != 0;
+ bool bWasDefButton = ( GetPrevStyle() & WB_DEFBUTTON ) != 0;
+ if ( bIsDefButton != bWasDefButton )
+ ImplSetDefButton( bIsDefButton );
+
if ( IsReallyVisible() && IsUpdateMode() )
{
if ( (GetPrevStyle() & PUSHBUTTON_VIEW_STYLE) !=