Check if the context can show the new layer name dialog

This commit is contained in:
David Capello 2019-07-10 12:45:53 -03:00
parent af4fd54c2a
commit 1ae29dfc3c

View File

@ -181,7 +181,7 @@ void NewLayerCommand::onExecute(Context* context)
#ifdef ENABLE_UI
// If params specify to ask the user about the name...
if (params().ask()) {
if (params().ask() && context->isUIAvailable()) {
// We open the window to ask the name
app::gen::NewLayer window;
window.name()->setText(name.c_str());