mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-06 06:58:15 +00:00
Fix using MoveMask command without visible selection
Issue found testing #2796 without selection/without calling SelectTile command.
This commit is contained in:
parent
daa7cc837a
commit
6e0394b7dc
@ -66,7 +66,10 @@ bool MoveMaskCommand::onEnabled(Context* context)
|
|||||||
ContextFlags::HasActiveImage |
|
ContextFlags::HasActiveImage |
|
||||||
ContextFlags::ActiveLayerIsEditable);
|
ContextFlags::ActiveLayerIsEditable);
|
||||||
else
|
else
|
||||||
return (current_editor ? true: false);
|
return (current_editor != nullptr) &&
|
||||||
|
context->checkFlags(ContextFlags::HasActiveDocument |
|
||||||
|
ContextFlags::HasVisibleMask |
|
||||||
|
ContextFlags::HasActiveImage);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2556,6 +2556,7 @@ void Editor::startSelectionTransformation(const gfx::Point& move, double angle)
|
|||||||
movingPixels->rotate(angle);
|
movingPixels->rotate(angle);
|
||||||
}
|
}
|
||||||
else if (StandbyState* standby = dynamic_cast<StandbyState*>(m_state.get())) {
|
else if (StandbyState* standby = dynamic_cast<StandbyState*>(m_state.get())) {
|
||||||
|
ASSERT(m_document->isMaskVisible());
|
||||||
standby->startSelectionTransformation(this, move, angle);
|
standby->startSelectionTransformation(this, move, angle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user