mirror of
https://github.com/aseprite/aseprite.git
synced 2024-11-20 14:21:45 +00:00
Make NewLayerCommand compilable when ENABLE_UI is not defined
This commit is contained in:
parent
fe4106457f
commit
a0ebecca50
@ -104,8 +104,11 @@ bool NewLayerCommand::onEnabled(Context* context)
|
||||
{
|
||||
return context->checkFlags(ContextFlags::ActiveDocumentIsWritable |
|
||||
ContextFlags::HasActiveSprite)
|
||||
&& (!params().fromClipboard() ||
|
||||
(clipboard::get_current_format() == clipboard::ClipboardImage));
|
||||
&& (!params().fromClipboard()
|
||||
#ifdef ENABLE_UI
|
||||
|| (clipboard::get_current_format() == clipboard::ClipboardImage)
|
||||
#endif
|
||||
);
|
||||
}
|
||||
|
||||
namespace {
|
||||
@ -327,10 +330,12 @@ void NewLayerCommand::onExecute(Context* context)
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef ENABLE_UI
|
||||
// Paste new layer from clipboard
|
||||
else if (params().fromClipboard() && layer->isImage()) {
|
||||
clipboard::paste(context, false);
|
||||
}
|
||||
#endif // ENABLE_UI
|
||||
|
||||
tx.commit();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user