mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-15 19:52:05 +00:00
Fix arrow keys to move the selection content
Regression introduced in 1c05ea10bb
This commit is contained in:
parent
798d0e9a08
commit
89bf12a60a
@ -509,12 +509,15 @@ void MovingPixelsState::onBeforeCommandExecution(CommandExecutionEvent& ev)
|
|||||||
// We don't need to drop the pixels if a MoveMaskCommand of Content is executed.
|
// We don't need to drop the pixels if a MoveMaskCommand of Content is executed.
|
||||||
if (MoveMaskCommand* moveMaskCmd = dynamic_cast<MoveMaskCommand*>(command)) {
|
if (MoveMaskCommand* moveMaskCmd = dynamic_cast<MoveMaskCommand*>(command)) {
|
||||||
if (moveMaskCmd->getTarget() == MoveMaskCommand::Content) {
|
if (moveMaskCmd->getTarget() == MoveMaskCommand::Content) {
|
||||||
// Do not drop pixels
|
gfx::Point delta = moveMaskCmd->getMoveThing().getDelta(UIContext::instance());
|
||||||
// Verify Shift condition of the MoveMaskCommand (i.e. wrap = true)
|
// Verify Shift condition of the MoveMaskCommand (i.e. wrap = true)
|
||||||
if (moveMaskCmd->isWrap()) {
|
if (moveMaskCmd->isWrap()) {
|
||||||
gfx::Point delta = moveMaskCmd->getMoveThing().getDelta(UIContext::instance());
|
m_pixelsMovement->shift(delta.x, delta.y);
|
||||||
m_pixelsMovement->shift(delta.x, delta.y);
|
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
translate(delta);
|
||||||
|
}
|
||||||
|
// We've processed the selection content movement right here.
|
||||||
ev.cancel();
|
ev.cancel();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user