Sync selected cut duration from schedule edits
This commit is contained in:
@@ -1113,6 +1113,17 @@ public sealed class ChannelScheduleViewModel : ObservableObject
|
||||
NotifySelectedFormatDurationStateChanged();
|
||||
}
|
||||
|
||||
public void RefreshSelectedFormatDuration(FormatTemplateDefinition template)
|
||||
{
|
||||
if (SelectedFormat is null ||
|
||||
!string.Equals(SelectedFormat.Id, template.Id, StringComparison.Ordinal))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
ResetSelectedFormatDurationDraft();
|
||||
}
|
||||
|
||||
private void NotifySelectedFormatDurationStateChanged()
|
||||
{
|
||||
OnPropertyChanged(
|
||||
|
||||
@@ -1432,6 +1432,7 @@ public sealed class MainViewModel : ObservableObject
|
||||
private void OnCutDurationChanged(FormatTemplateDefinition template)
|
||||
{
|
||||
SyncQueuedCutDurations(template);
|
||||
RefreshSelectedFormatDurations(template);
|
||||
QueueAutomaticSave();
|
||||
}
|
||||
|
||||
@@ -1474,6 +1475,7 @@ public sealed class MainViewModel : ObservableObject
|
||||
{
|
||||
RefreshCutListEntries(template);
|
||||
SyncQueuedCutDurations(template);
|
||||
RefreshSelectedFormatDurations(template);
|
||||
QueueAutomaticSave();
|
||||
}
|
||||
}
|
||||
@@ -1487,6 +1489,14 @@ public sealed class MainViewModel : ObservableObject
|
||||
}
|
||||
}
|
||||
|
||||
private void RefreshSelectedFormatDurations(FormatTemplateDefinition template)
|
||||
{
|
||||
foreach (var channel in Channels)
|
||||
{
|
||||
channel.RefreshSelectedFormatDuration(template);
|
||||
}
|
||||
}
|
||||
|
||||
private void ApplyCutDurations(IReadOnlyDictionary<string, double>? durations)
|
||||
{
|
||||
if (durations is null || durations.Count == 0)
|
||||
|
||||
Reference in New Issue
Block a user