diff --git a/src/app/commands/cmd_move_mask.cpp b/src/app/commands/cmd_move_mask.cpp index efc101f59..a100e3b0f 100644 --- a/src/app/commands/cmd_move_mask.cpp +++ b/src/app/commands/cmd_move_mask.cpp @@ -66,7 +66,10 @@ bool MoveMaskCommand::onEnabled(Context* context) ContextFlags::HasActiveImage | ContextFlags::ActiveLayerIsEditable); else - return (current_editor ? true: false); + return (current_editor != nullptr) && + context->checkFlags(ContextFlags::HasActiveDocument | + ContextFlags::HasVisibleMask | + ContextFlags::HasActiveImage); } diff --git a/src/app/ui/editor/editor.cpp b/src/app/ui/editor/editor.cpp index 7b2523ab4..5c915d78a 100644 --- a/src/app/ui/editor/editor.cpp +++ b/src/app/ui/editor/editor.cpp @@ -2556,6 +2556,7 @@ void Editor::startSelectionTransformation(const gfx::Point& move, double angle) movingPixels->rotate(angle); } else if (StandbyState* standby = dynamic_cast(m_state.get())) { + ASSERT(m_document->isMaskVisible()); standby->startSelectionTransformation(this, move, angle); } }