mirror of
https://github.com/aseprite/aseprite.git
synced 2025-02-06 03:39:51 +00:00
Fix RemoveLayer command so it's disabled when we have no more layers to remove
This commit is contained in:
parent
5601b07df6
commit
4d48e40484
@ -54,9 +54,11 @@ RemoveLayerCommand::RemoveLayerCommand()
|
||||
|
||||
bool RemoveLayerCommand::onEnabled(Context* context)
|
||||
{
|
||||
ContextWriter writer(context);
|
||||
Sprite* sprite(writer.sprite());
|
||||
return (sprite != NULL);
|
||||
return context->checkFlags(ContextFlags::ActiveDocumentIsWritable |
|
||||
ContextFlags::HasActiveSprite |
|
||||
ContextFlags::HasActiveLayer |
|
||||
ContextFlags::ActiveLayerIsReadable |
|
||||
ContextFlags::ActiveLayerIsWritable);
|
||||
}
|
||||
|
||||
void RemoveLayerCommand::onExecute(Context* context)
|
||||
|
Loading…
x
Reference in New Issue
Block a user