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.
This commit is contained in:
David Capello 2016-05-02 13:33:29 -03:00
parent d9604d9905
commit d838cbf91b

View File

@ -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,