It turned out the broadcasting was happening just after EditorDestroyLevel call, and the boardcasted delegate does use a pointer to that destroyed level.
Note: this change has been merged over from dev branch, and it's bringing back functionality cut out by DmitriyD in CL#2510067
#codereview Ben.Cosh, Dmitriy.Dyomin
[CL 2532989 by Mieszko Zielinski in Main branch]
#UE-10665 - when a sub level is removed it fails to remove any graph actions registered for itself
#UE-10962 - Blueprint level script functions are missing from action menu
#UE-7004 - Custom Events can't be called after changing level blueprint or switching maps
#Branch UE4
#Proj BlueprintGraph
#codereview Mike.Beach
[CL 2509582 by Ben Cosh in Main branch]
I have reviewed each change carefully, but it is a large change and I could have missed something! Here is a summary of the types of changes in this CL:
* Made nullptr checks consistent (the plurality of the changes are of this type)
* Completed switch statements (IE, switch did not explicitly handle default case, but had unhandled enum entries - this is the second most popular type of fix)
* Removed unused variables
* Removed redundant initializations
* WidgetNavigationCustomization.cpp was fixed by the owner
* integers converted to floats where result was stored in a float
* Removed redundent null checks (e.g. before delete statements)
* Renamed variables to prevent non-obvious shadowing
* Fixed use of bitwise & when checking for equality to an enum entry (which is often 0)
* Fixes for some copy paste errors (e.g. FoliageEdMode.cpp)
[CL 2498053 by Dan Oconnor in Main branch]
These can be generally described as removing redundant condition checks, using logical operators instead of bitwise operators, removal of redundant parenthesis, and consistent use of pragma push and pragma pop. There is very little observable behavior change in this CL.
Changes that required further review are pending in 2489753
[CL 2489804 by Dan Oconnor in Main branch]
#jira UE-764 - EDITOR: CRASH: Removing a currently loaded sub level from level browser after it is saved results in a crash
[CL 2334421 by Richard TalbotWatkin in Main branch]
FScopedSlowTask has been refactored to better allow for nesting of slow operations. This allows us to cascade nested scopes and provide accurate feedback on slow tasks. FScopedSlowTasks now work together when nested inside sub functions. Break up long functions that contain calls to multiple nested FScopedSlowTasks with FScopedSlowTask::EnterProgressFrame().
Example Usage:
void DoSlowWork()
{
FScopedSlowTask Progress(2.f, LOCTEXT("DoingSlowWork", "Doing Slow Work..."));
// Optionally make this show a dialog if not already shown
Progress.MakeDialog();
// Indicate that we are entering a frame representing 1 unit of work
Progress.EnterProgressFrame(1.f);
// DoFirstThing() can follow a similar pattern of creating a scope divided into frames. These contribute to their parent's progress frame proportionately.
DoFirstThing();
Progress.EnterProgressFrame(1.f);
DoSecondThing();
}
This addresses TTP#338602 - NEEDS REVIEW: Editor progress bars nearly always just show 100%, don't offer useful indication of progress
[CL 2322391 by Andrew Rodham in Main branch]
#ttp 347330 - EDITOR: CRASH: Attempting to rename a level asset that was recently removed from the level browser can result in a crash
#branch UE4
#proj Editor.UnrealEd
#add Clear the dirty flag and unload the package in EditorLevelUtils::EditorDestroyLevel after destroying the ULevel and UWorld objects.
#reviewedby Matt.Kuhlenschmidt, Bob.Tellez
[CL 2310371 by Richard TalbotWatkin in Main branch]
#UE4 Deprecated ULevelStreaming::PackageName in favor of the new WorldAsset TAssetPtr. This will allow editor tools to properly follow references from persistent levels to sublevels. All existing usage of PackageName has been replaced with GetWorldAssetPackageName() and SetWorldAssetByPackageName().
--------
Integrated using branch Ue4-To-UE4-Fortnite-Simple (reversed) of change#2269772 by Bob.Tellez on 2014/08/24 16:49:38.
[CL 2269774 by Bob Tellez in Main branch]
UE4: Consolidated worldassets command line checks to a static function in editorengine and one in the asset registry. This will make it easier to enable
--------
Integrated using branch Ue4-To-UE4-Fortnite-Simple (reversed) of change#2255048 by Bob.Tellez on 2014/08/13 15:19:54.
[CL 2255061 by Bob Tellez in Main branch]