Enhancement one click selection on Add & Subtract modes (issue #1811)

This commit is contained in:
Gaspar Capello 2018-08-10 11:47:50 -03:00 committed by David Capello
parent e0315a18f9
commit e0c1c3c1d3

View File

@ -146,12 +146,14 @@ bool DrawingState::onMouseUp(Editor* editor, MouseMessage* msg)
{
ASSERT(m_toolLoopManager != NULL);
// Selection tools are cancelled with a simple click (only "one
// point" controller selection tools aren't cancelled with one click,
// i.e. the magic wand).
// Selection tools with Replace mode are cancelled with a simple click.
// ("one point" controller selection tool i.e. the magic wand, and
// selection tools with Add or Subtract mode aren't cancelled with
// one click).
if (!m_toolLoop->getInk()->isSelection() ||
m_toolLoop->getController()->isOnePoint() ||
m_mouseMoveReceived) {
m_mouseMoveReceived ||
editor->getToolLoopModifiers() != tools::ToolLoopModifiers::kReplaceSelection) {
// Notify the release of the mouse button to the tool loop
// manager. This is the correct way to say "the user finishes the
// drawing trace correctly".