summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Services/Queue
diff options
context:
space:
mode:
authorsr55 <[email protected]>2018-01-13 20:30:44 +0000
committersr55 <[email protected]>2018-01-13 20:31:06 +0000
commitd076119d72215edfd3388ebe0d4ee2256f17d586 (patch)
tree1d5dd2616a96745dfa59d6a8ddec5dddb324a304 /win/CS/HandBrakeWPF/Services/Queue
parent3c35763f418801a564b07a7c6818337c93f8aeef (diff)
WinGui: Reselect the last selected preset (if still available) when editing a queue task. Fix a bug on the summary task not rendering correctly when queue editing.
Diffstat (limited to 'win/CS/HandBrakeWPF/Services/Queue')
-rw-r--r--win/CS/HandBrakeWPF/Services/Queue/Model/QueueTask.cs19
1 files changed, 18 insertions, 1 deletions
diff --git a/win/CS/HandBrakeWPF/Services/Queue/Model/QueueTask.cs b/win/CS/HandBrakeWPF/Services/Queue/Model/QueueTask.cs
index 334842d31..eed9069aa 100644
--- a/win/CS/HandBrakeWPF/Services/Queue/Model/QueueTask.cs
+++ b/win/CS/HandBrakeWPF/Services/Queue/Model/QueueTask.cs
@@ -13,6 +13,7 @@ namespace HandBrakeWPF.Services.Queue.Model
using HandBrake.ApplicationServices.Model;
+ using HandBrakeWPF.Services.Presets.Model;
using HandBrakeWPF.Utilities;
using EncodeTask = HandBrakeWPF.Services.Encode.Model.EncodeTask;
@@ -24,6 +25,7 @@ namespace HandBrakeWPF.Services.Queue.Model
{
private static int id;
private QueueItemStatus status;
+ private string presetKey;
#region Properties
@@ -50,12 +52,19 @@ namespace HandBrakeWPF.Services.Queue.Model
/// <param name="scannedSourcePath">
/// The scanned Source Path.
/// </param>
- public QueueTask(EncodeTask task, HBConfiguration configuration, string scannedSourcePath)
+ /// <param name="currentPreset">
+ /// The currently active preset.
+ /// </param>
+ public QueueTask(EncodeTask task, HBConfiguration configuration, string scannedSourcePath, Preset currentPreset)
{
this.Task = task;
this.Configuration = configuration;
this.Status = QueueItemStatus.Waiting;
this.ScannedSourcePath = scannedSourcePath;
+ if (currentPreset != null)
+ {
+ this.presetKey = currentPreset.Name;
+ }
id = id + 1;
this.Id = string.Format("{0}.{1}", GeneralUtilities.ProcessId, id);
@@ -99,6 +108,14 @@ namespace HandBrakeWPF.Services.Queue.Model
public QueueStats Statistics { get; set; }
+ public string SelectedPresetKey
+ {
+ get
+ {
+ return this.presetKey;
+ }
+ }
+
#endregion
protected bool Equals(QueueTask other)