From 331e09bdbf1465d638e9b8d224e58089f05cd7ad Mon Sep 17 00:00:00 2001 From: David Capello Date: Thu, 28 Sep 2017 11:27:05 -0300 Subject: [PATCH] Fix Ctrl+drag and drop to copy the selection content on Windows Regression introduced in ec2a1f229d48c76f1d8124102e7c3a69f236f32f Bug reports: https://community.aseprite.org/t/503 --- src/app/ui/editor/editor.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/app/ui/editor/editor.cpp b/src/app/ui/editor/editor.cpp index 10d2d0a57..8b32069b4 100644 --- a/src/app/ui/editor/editor.cpp +++ b/src/app/ui/editor/editor.cpp @@ -1894,11 +1894,14 @@ bool Editor::isInsideSelection() bool Editor::canStartMovingSelectionPixels() { return - (isInsideSelection()) && - // In this way we cannot move the selection when add/subtract - // modes are enabled (we prefer to modify the selection on those - // modes instead of moving pixels). - (int(m_toolLoopModifiers) & int(tools::ToolLoopModifiers::kReplaceSelection)); + isInsideSelection() && + // We cannot move the selection when add/subtract modes are + // enabled (we prefer to modify the selection on those modes + // instead of moving pixels). + ((int(m_toolLoopModifiers) & int(tools::ToolLoopModifiers::kReplaceSelection)) || + // We can move the selection when the Copy selection key (Ctrl) is pressed. + (m_customizationDelegate && + int(m_customizationDelegate->getPressedKeyAction(KeyContext::TranslatingSelection) & KeyAction::CopySelection))); } EditorHit Editor::calcHit(const gfx::Point& mouseScreenPos)