Skip to content

Commit

Permalink
Debugger: Update viewers when loading a save state
Browse files Browse the repository at this point in the history
  • Loading branch information
SourMesen committed Dec 25, 2023
1 parent 04793df commit 52b3196
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions UI/Debugger/Utilities/ToolRefreshHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ public static void ProcessNotification(Window wnd, NotificationEventArgs e, Refr
}
break;

case ConsoleNotificationType.StateLoaded:
refresh();
break;

case ConsoleNotificationType.CodeBreak:
if(cfg.Config.RefreshOnBreakPause) {
refresh();
Expand Down
4 changes: 4 additions & 0 deletions UI/Debugger/Windows/EventViewerWindow.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,10 @@ public void ProcessNotification(NotificationEventArgs e)
}
break;

case ConsoleNotificationType.StateLoaded:
_model.RefreshData();
break;

case ConsoleNotificationType.CodeBreak:
if(_model.Config.RefreshOnBreakPause) {
_model.RefreshData();
Expand Down
1 change: 1 addition & 0 deletions UI/Debugger/Windows/MemoryToolsWindow.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,7 @@ public void ProcessNotification(NotificationEventArgs e)
{
switch(e.NotificationType) {
case ConsoleNotificationType.CodeBreak:
case ConsoleNotificationType.StateLoaded:
Dispatcher.UIThread.Post(() => {
_editor.InvalidateVisual();
});
Expand Down
2 changes: 1 addition & 1 deletion UI/Debugger/Windows/SpriteViewerWindow.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ private void OnSettingsClick(object sender, RoutedEventArgs e)

public void ProcessNotification(NotificationEventArgs e)
{
if(e.NotificationType == ConsoleNotificationType.CodeBreak) {
if(e.NotificationType == ConsoleNotificationType.CodeBreak || e.NotificationType == ConsoleNotificationType.StateLoaded) {
_model.ListView.ForceRefresh();
}

Expand Down

0 comments on commit 52b3196

Please sign in to comment.