From 1bee62ce8a5ea650fe48fc6bd71b180c9fba64ad Mon Sep 17 00:00:00 2001 From: David Capello Date: Wed, 19 Aug 2015 18:05:03 -0300 Subject: [PATCH] Call eyedropper with right-click only when we have the mouse capture (fix #706) --- src/app/ui/editor/standby_state.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app/ui/editor/standby_state.cpp b/src/app/ui/editor/standby_state.cpp index 58ac8d074..6e077fa26 100644 --- a/src/app/ui/editor/standby_state.cpp +++ b/src/app/ui/editor/standby_state.cpp @@ -218,6 +218,7 @@ bool StandbyState::onMouseDown(Editor* editor, MouseMessage* msg) // Call the eyedropper command if (clickedInk->isEyedropper()) { + editor->captureMouse(); callEyedropper(editor); return true; } @@ -290,8 +291,10 @@ bool StandbyState::onMouseMove(Editor* editor, MouseMessage* msg) // We control eyedropper tool from here. TODO move this to another place if (msg->left() || msg->right()) { tools::Ink* clickedInk = editor->getCurrentEditorInk(); - if (clickedInk->isEyedropper()) + if (clickedInk->isEyedropper() && + editor->hasCapture()) { callEyedropper(editor); + } } editor->showBrushPreview(msg->position());