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