summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-05-15 14:54:58 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-05-15 17:27:10 +0200
commit23a1b7bad5147ee48d7f920085426d8846559af7 (patch)
treec8ea9636d9f2a6830d1cd3e5ffa6c55b82834f1c /svtools
parentf0ca5a0c447f4fe4667693d744af61eaeb0625ee (diff)
Resolves: tdf#132461 set color on mouse release, not press
and rearrange to allow dnd to drop the currently selected color, not the one seen by SelectHdl which is now called on mouse release which allows the dnd from color bar to gradiant tool to work as expected Change-Id: Ib54850ff8f73dc3a0d08c76060309a7a74d2cc8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94314 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/control/valueset.cxx12
1 files changed, 11 insertions, 1 deletions
diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx
index e195f195f48d..4bc20997393f 100644
--- a/svtools/source/control/valueset.cxx
+++ b/svtools/source/control/valueset.cxx
@@ -477,7 +477,6 @@ bool ValueSet::MouseButtonDown( const MouseEvent& rMouseEvent )
SelectItem( pItem->mnId );
if (!(GetStyle() & WB_NOPOINTERFOCUS))
GrabFocus();
- Select();
}
else if ( rMouseEvent.GetClicks() == 2 )
maDoubleClickHdl.Call( this );
@@ -489,6 +488,17 @@ bool ValueSet::MouseButtonDown( const MouseEvent& rMouseEvent )
return CustomWidgetController::MouseButtonDown( rMouseEvent );
}
+bool ValueSet::MouseButtonUp( const MouseEvent& rMouseEvent )
+{
+ if (rMouseEvent.IsLeft() && !rMouseEvent.IsMod2())
+ {
+ Select();
+ return true;
+ }
+
+ return CustomWidgetController::MouseButtonUp( rMouseEvent );
+}
+
bool ValueSet::MouseMove(const MouseEvent& rMouseEvent)
{
// because of SelectionMode