summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2010-09-01 12:27:38 +0200
committerFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2010-09-01 12:27:38 +0200
commit6554b3de755e7b07c8d313d8bc7ae7b0c6638133 (patch)
tree6d588d8a0ab56b9a88fdc59bed84c70959a2453b
parent044ecdab8e5be57dbb4f40049bfa297bf9aa6c3f (diff)
fs33a: +i114247# sync WindowBits and Style
-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() );
}
}