Skip to content

Commit 1b08c7c

Browse files
Update CuesheetData.razor
1 parent 6a731d4 commit 1b08c7c

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

AudioCuesheetEditor/Shared/Cuesheet/CuesheetData.razor

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ along with Foobar. If not, see
4242
</MudForm>
4343
}
4444
@code {
45+
//TODO: Undoing & Redoing the audiofile doesn't set the validation error correctly
4546
[CascadingParameter]
4647
public Cuesheet? Cuesheet { get; set; }
4748

@@ -83,8 +84,10 @@ along with Foobar. If not, see
8384
{
8485
Cuesheet.Audiofile = await _fileInputManager.CreateAudiofileAsync(fileInputAudiofileId, browserFile, x =>
8586
{
86-
Cuesheet.RecalculateLastTrackEnd();
87-
TraceChangeManager.MergeLastEditWithEdit(x => x.Changes.All(y => y.TraceableObject == Cuesheet && y.TraceableChange.PropertyName == nameof(Audiofile)));
87+
if (Cuesheet.RecalculateLastTrackEnd())
88+
{
89+
TraceChangeManager.MergeLastEditWithEdit(x => x.Changes.All(y => y.TraceableObject == Cuesheet && y.TraceableChange.PropertyName == nameof(Audiofile)));
90+
}
8891
});
8992
}
9093
catch(ArgumentException ae)

0 commit comments

Comments
 (0)