Don't allow Insert Text when the layer is locked

Discussion: https://community.aseprite.org/t/750
This commit is contained in:
David Capello 2017-12-01 17:10:45 -03:00
parent e0a60b6748
commit 7682971acb

View File

@ -51,7 +51,8 @@ PasteTextCommand::PasteTextCommand()
bool PasteTextCommand::onEnabled(Context* ctx)
{
return ctx->checkFlags(ContextFlags::ActiveDocumentIsWritable);
return ctx->checkFlags(ContextFlags::ActiveDocumentIsWritable |
ContextFlags::ActiveLayerIsEditable);
}
class PasteTextWindow : public app::gen::PasteText {