Deleting a custom event when there are no other events in the Blueprint will no longer disallow you to name other items placed in the Blueprint the same as the deleted custom event.

Moved clearing of the Blueprint's EventGraphs to happen even when there are no ConsolidatedEventGraph nodes generated.

#jira UE-17225 - Deleted custom event restricts name use on other fucntions/variables

[CL 2597266 by Michael Schoell in Main branch]
This commit is contained in:
Michael Schoell
2015-06-23 12:03:07 -04:00
committed by mschoell@phosphorgames.com
parent 6e132604a3
commit 1b5907a68b
@@ -2692,6 +2692,19 @@ void FKismetCompilerContext::CreateAndProcessUbergraph()
}
}
// We need to stop the old EventGraphs from having the Blueprint as an outer, it impacts renaming.
if(!Blueprint->HasAnyFlags(RF_NeedLoad|RF_NeedPostLoad))
{
for(UEdGraph* OldEventGraph : Blueprint->EventGraphs)
{
if (OldEventGraph)
{
OldEventGraph->Rename(NULL, GetTransientPackage());
}
}
}
Blueprint->EventGraphs.Empty();
if (ConsolidatedEventGraph->Nodes.Num())
{
// Add a dummy entry point to the uber graph, to get the function signature correct
@@ -2717,19 +2730,6 @@ void FKismetCompilerContext::CreateAndProcessUbergraph()
UbergraphContext->MarkAsInternalOrCppUseOnly();
UbergraphContext->SetExternalNetNameMap(&ClassScopeNetNameMap);
// We need to stop the old EventGraphs from having the Blueprint as an outer, it impacts renaming.
if(!Blueprint->HasAnyFlags(RF_NeedLoad|RF_NeedPostLoad))
{
for(UEdGraph* OldEventGraph : Blueprint->EventGraphs)
{
if (OldEventGraph)
{
OldEventGraph->Rename(NULL, GetTransientPackage());
}
}
}
Blueprint->EventGraphs.Empty();
// Validate all the nodes in the graph
for (int32 ChildIndex = 0; ChildIndex < ConsolidatedEventGraph->Nodes.Num(); ++ChildIndex)
{