Skip to content

Commit

Permalink
EditorPage would updated the loaded map
Browse files Browse the repository at this point in the history
  • Loading branch information
iconstudio committed Oct 6, 2023
1 parent 606d058 commit f12d59e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Editor/TestEditor/Infrastructures/EditorPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ public sealed partial class EditorPage : Page
private ToolWindow paletteWindow;
private bool ignoreNcActivate;

private Map? CurrentMap { get; set; }

public EditorPage()
{
InitializeComponent();
Expand Down Expand Up @@ -76,6 +78,8 @@ private async void ProcessTransition(EditorTransitionCategory cat)
if (await MapHelper.LoadMap(MapHelper.LastFile) is Map map)
{
Debug.Print($"A map '{map.Name}' is loaded");

CurrentMap = map;
}
else
{
Expand All @@ -86,7 +90,7 @@ private async void ProcessTransition(EditorTransitionCategory cat)

case EditorTransitionCategory.Exit:
{

CurrentMap = null;
}
break;

Expand Down

0 comments on commit f12d59e

Please sign in to comment.