Animation Editor: Closing the Create Group window creates a new Parameter Group (#4167)

Signed-off-by: Benjamin Jillich <jillich@amazon.com>
This commit is contained in:
Benjamin Jillich
2021-09-17 13:07:01 +02:00
committed by GitHub
parent f5bd450673
commit 9a71a902d0
@@ -1461,10 +1461,15 @@ namespace EMStudio
// show the create window
auto createWindow = new ParameterCreateRenameWindow("Create Group", "Please enter the group name:", uniqueGroupName.c_str(), "", invalidNames, this);
connect(createWindow, &QDialog::finished, this, [this, createWindow]()
connect(createWindow, &QDialog::finished, this, [this, createWindow](int resultCode)
{
createWindow->deleteLater();
if (resultCode == QDialog::Rejected)
{
return;
}
AZStd::string command = AZStd::string::format("AnimGraphAddGroupParameter -animGraphID %i -name \"%s\"", m_animGraph->GetID(), createWindow->GetName().c_str());
const EMotionFX::GroupParameter* parentGroup = nullptr;
const EMotionFX::Parameter* selectedParameter = GetSingleSelectedParameter();