summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/contnr/svtreebx.cxx12
1 files changed, 11 insertions, 1 deletions
diff --git a/svtools/source/contnr/svtreebx.cxx b/svtools/source/contnr/svtreebx.cxx
index 3b1430e0df77..fa3cf8e734c1 100644
--- a/svtools/source/contnr/svtreebx.cxx
+++ b/svtools/source/contnr/svtreebx.cxx
@@ -1513,6 +1513,11 @@ void SvTreeListBox::SetWindowBits( WinBits nWinStyle )
pImp->SetWindowBits( nWinStyle );
pImp->Resize();
Invalidate();
+
+ if ( nWindowStyle != GetStyle() )
+ {
+ SetStyle( nWindowStyle );
+ }
}
void SvTreeListBox::PaintEntry( SvLBoxEntry* pEntry )
@@ -2521,7 +2526,12 @@ void SvTreeListBox::StateChanged( StateChangedType i_nStateChange )
SvLBox::StateChanged( i_nStateChange );
if ( ( i_nStateChange & STATE_CHANGE_STYLE ) != 0 )
{
- SetWindowBits( GetStyle() );
+ if ( GetStyle() != nWindowStyle )
+ // keep in sync with our WindowBits
+ // TODO: SetWindowBits is weird, it should be completely replaced (in all clients) with SetStyle
+ // (or are there WindowBits which have a different meaning when interpreted as style? Wouldn't
+ // be the first time, but all of those should be fixed meanwhile ...)
+ SetWindowBits( GetStyle() );
}
}