[aseprite] 91/128: Key modifiers now disable the 'moving' action on selection (fix #1105)

Tobias Hansen thansen at moszumanska.debian.org
Mon May 9 21:24:27 UTC 2016


This is an automated email from the git hooks/post-receive script.

thansen pushed a commit to branch master
in repository aseprite.

commit d838cbf91b2921f6b8794cb055ce8e229153a1f7
Author: David Capello <davidcapello at gmail.com>
Date:   Mon May 2 13:33:29 2016 -0300

    Key modifiers now disable the 'moving' action on selection (fix #1105)
    
    Now we can move the selection only using the default selection mode
    (even when it's subtract mode). With this is easier to add new regions
    starting the selection from the inside of the active selection.
---
 src/app/ui/editor/editor.cpp | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/app/ui/editor/editor.cpp b/src/app/ui/editor/editor.cpp
index fbf1916..ba6bb9f 100644
--- a/src/app/ui/editor/editor.cpp
+++ b/src/app/ui/editor/editor.cpp
@@ -1411,11 +1411,12 @@ bool Editor::canDraw()
 bool Editor::isInsideSelection()
 {
   gfx::Point spritePos = screenToEditor(ui::get_mouse_position());
+  KeyAction action = m_customizationDelegate->getPressedKeyAction(KeyContext::SelectionTool);
   return
-    ((int(m_toolLoopModifiers) & int(tools::ToolLoopModifiers::kSubtractSelection)) == 0) &&
-     m_document != NULL &&
-     m_document->isMaskVisible() &&
-     m_document->mask()->containsPoint(spritePos.x, spritePos.y);
+    (action == KeyAction::None) &&
+    m_document &&
+    m_document->isMaskVisible() &&
+    m_document->mask()->containsPoint(spritePos.x, spritePos.y);
 }
 
 void Editor::setZoomAndCenterInMouse(const Zoom& zoom,

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/aseprite.git



More information about the Pkg-games-commits mailing list