Skip to content

Commit

Permalink
add update after tracemanager changes
Browse files Browse the repository at this point in the history
  • Loading branch information
NeoCoderMatrix86 committed Nov 12, 2024
1 parent 4b8bd98 commit c3c5635
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
15 changes: 0 additions & 15 deletions AudioCuesheetEditor/Shared/TrackList/TrackList.razor
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,6 @@ along with Foobar. If not, see
_localizationService.LocalizationChanged -= LocalizationService_LocalizationChanged;
_sessionStateContainer.CuesheetChanged -= SessionStateContainer_CuesheetChanged;
_sessionStateContainer.ImportCuesheetChanged -= SessionStateContainer_ImportCuesheetChanged;
_traceChangeManager.UndoDone -= TraceChangeManager_UndoDone;
_traceChangeManager.RedoDone -= TraceChangeManager_RedoDone;
_sessionStateContainer.Cuesheet.TrackRemoved -= Cuesheet_TrackRemoved;
_sessionStateContainer.Cuesheet.TrackAdded -= Cuesheet_TrackAdded;
DetachTrackFromValidateablePropertyChanged();
Expand All @@ -229,9 +227,6 @@ along with Foobar. If not, see
_sessionStateContainer.CuesheetChanged += SessionStateContainer_CuesheetChanged;
_sessionStateContainer.ImportCuesheetChanged += SessionStateContainer_ImportCuesheetChanged;

_traceChangeManager.UndoDone += TraceChangeManager_UndoDone;
_traceChangeManager.RedoDone += TraceChangeManager_RedoDone;

_sessionStateContainer.Cuesheet.TrackAdded += Cuesheet_TrackAdded;
_sessionStateContainer.Cuesheet.TrackRemoved += Cuesheet_TrackRemoved;

Expand Down Expand Up @@ -383,16 +378,6 @@ along with Foobar. If not, see
StateHasChanged();
}

private void TraceChangeManager_UndoDone(object? sender, EventArgs args)
{
StateHasChanged();
}

private void TraceChangeManager_RedoDone(object? sender, EventArgs args)
{
StateHasChanged();
}

void Cuesheet_TrackAdded(object? sender, TrackAddRemoveEventArgs args)
{
StateHasChanged();
Expand Down
14 changes: 14 additions & 0 deletions AudioCuesheetEditor/Shared/TrackList/TrackListItem.razor
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ along with Foobar. If not, see
public void Dispose()
{
_localizationService.LocalizationChanged -= LocalizationService_LocalizationChanged;
_traceChangeManager.UndoDone -= TraceChangeManager_UndoDone;
_traceChangeManager.RedoDone -= TraceChangeManager_RedoDone;
}

[Parameter, EditorRequired]
Expand Down Expand Up @@ -175,6 +177,8 @@ along with Foobar. If not, see
{
base.OnInitialized();
_localizationService.LocalizationChanged += LocalizationService_LocalizationChanged;
_traceChangeManager.UndoDone += TraceChangeManager_UndoDone;
_traceChangeManager.RedoDone += TraceChangeManager_RedoDone;
}

void LocalizationService_LocalizationChanged(object? sender, EventArgs args)
Expand Down Expand Up @@ -276,4 +280,14 @@ along with Foobar. If not, see
selectedTracks.Remove(track);
SelectedTracksChanged.InvokeAsync(selectedTracks);
}

void TraceChangeManager_UndoDone(object? sender, EventArgs args)
{
StateHasChanged();
}

void TraceChangeManager_RedoDone(object? sender, EventArgs args)
{
StateHasChanged();
}
}

0 comments on commit c3c5635

Please sign in to comment.