summaryrefslogtreecommitdiff
path: root/svx/source/dialog/checklbx.cxx
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-09-01 21:56:16 +0200
committerFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-09-01 21:56:16 +0200
commit23eb90b58cd29c102d4e6f6e940933b04d9a87a7 (patch)
tree943a34a1d56e1bb3d9f0865158f111a22b2a64e7 /svx/source/dialog/checklbx.cxx
parent1f01f13ddb5738edb341a00e66ec289d20faf47f (diff)
dba33i: #i112694# care for mouse handlers which tamper with the tree: survive this
Diffstat (limited to 'svx/source/dialog/checklbx.cxx')
-rw-r--r--svx/source/dialog/checklbx.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/svx/source/dialog/checklbx.cxx b/svx/source/dialog/checklbx.cxx
index c54634017392..80096ce70f32 100644
--- a/svx/source/dialog/checklbx.cxx
+++ b/svx/source/dialog/checklbx.cxx
@@ -212,7 +212,7 @@ void SvxCheckListBox::MouseButtonDown( const MouseEvent& rMEvt )
{
if ( rMEvt.IsLeft() )
{
- Point aPnt = rMEvt.GetPosPixel();
+ const Point aPnt = rMEvt.GetPosPixel();
SvLBoxEntry* pEntry = GetEntry( aPnt );
if ( pEntry )
@@ -230,6 +230,13 @@ void SvxCheckListBox::MouseButtonDown( const MouseEvent& rMEvt )
{
ToggleCheckButton( pEntry );
SvTreeListBox::MouseButtonDown( rMEvt );
+
+ // check if the entry below the mouse changed during the base method call. This is possible if,
+ // for instance, a handler invoked by the base class tampers with the list entries.
+ const SvLBoxEntry* pNewEntry = GetEntry( aPnt );
+ if ( pNewEntry != pEntry )
+ return;
+
if ( bCheck != ( GetCheckButtonState( pEntry ) == SV_BUTTON_CHECKED ) )
CheckButtonHdl();
return;