diff options
-rw-r--r-- | svtools/source/control/valueset.cxx | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index c30ada1d4ba3..c2baa2d5a483 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.cxx @@ -481,20 +481,27 @@ bool ValueSet::MouseButtonDown( const MouseEvent& rMouseEvent ) { if (rMouseEvent.IsLeft() && !rMouseEvent.IsMod2()) { + bool bConsumed = false; ValueSetItem* pItem = ImplGetItem( ImplGetItem( rMouseEvent.GetPosPixel() ) ); - if (pItem) + if (rMouseEvent.GetClicks() == 1) { - if (rMouseEvent.GetClicks() == 1) + if (pItem) { - SelectItem( pItem->mnId ); - if (!(GetStyle() & WB_NOPOINTERFOCUS)) - GrabFocus(); + SelectItem(pItem->mnId); + bConsumed = true; } - else if ( rMouseEvent.GetClicks() == 2 ) - maDoubleClickHdl.Call( this ); - - return true; + if (!(GetStyle() & WB_NOPOINTERFOCUS)) + { + GrabFocus(); + bConsumed = true; + } + } + else if (pItem && rMouseEvent.GetClicks() == 2) + { + maDoubleClickHdl.Call(this); + bConsumed = true; } + return bConsumed; } return CustomWidgetController::MouseButtonDown( rMouseEvent ); |