Don't add a reference layer if the user cancels the dialog

This commit is contained in:
David Capello 2017-09-05 15:26:21 -03:00
parent 86e14fa2ff
commit 49d2cd14f0

View File

@ -143,6 +143,10 @@ void NewLayerCommand::onExecute(Context* context)
static_cast<UIContext*>(context)
->setActiveDocument(oldActiveDocument);
}
// If the user didn't selected a new document, it means that the
// file selector dialog was canceled.
else
return;
}
// If params specify to ask the user about the name...