mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-29 01:20:17 +00:00
Call eyedropper with right-click only when we have the mouse capture (fix #706)
This commit is contained in:
parent
2b4c531e8e
commit
1bee62ce8a
@ -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());
|
||||
|
Loading…
x
Reference in New Issue
Block a user