From 1ae29dfc3c9d4e089f90bca45f3d43196250fa49 Mon Sep 17 00:00:00 2001 From: David Capello Date: Wed, 10 Jul 2019 12:45:53 -0300 Subject: [PATCH] Check if the context can show the new layer name dialog --- src/app/commands/cmd_new_layer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/commands/cmd_new_layer.cpp b/src/app/commands/cmd_new_layer.cpp index 06cae48f7..54c56514e 100644 --- a/src/app/commands/cmd_new_layer.cpp +++ b/src/app/commands/cmd_new_layer.cpp @@ -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());