]> granicus.if.org Git - handbrake/commitdiff
WinGui: Fix various issues on the filter tab when returning items from the queue...
authorsr55 <sr55.hb@outlook.com>
Wed, 14 Feb 2018 21:50:39 +0000 (21:50 +0000)
committersr55 <sr55.hb@outlook.com>
Wed, 14 Feb 2018 21:50:39 +0000 (21:50 +0000)
win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs

index 1582617ecd0d9b098a14f2cb743a8013146eb65f..f6c46631b4d476dad4efd77ab1c72f1afe106b67 100644 (file)
@@ -306,13 +306,7 @@ namespace HandBrakeWPF.ViewModels
         /// <summary>\r
         /// Show the CombDetect Custom Box.\r
         /// </summary>\r
-        public bool ShowCombDetectCustom\r
-        {\r
-            get\r
-            {\r
-                return this.SelectedCombDetectPreset == CombDetect.Custom;\r
-            }\r
-        }\r
+        public bool ShowCombDetectCustom => this.SelectedCombDetectPreset == CombDetect.Custom;\r
 \r
         /// <summary>\r
         /// Gets or sets the custom comb detect.\r
@@ -373,7 +367,6 @@ namespace HandBrakeWPF.ViewModels
                 this.NotifyOfPropertyChange(() => this.SelectedDenoise);\r
 \r
                 // Show / Hide the Custom Control\r
-                this.ShowDenoiseCustom = this.CurrentTask.DenoisePreset == DenoisePreset.Custom;\r
                 this.NotifyOfPropertyChange(() => this.ShowDenoiseCustom);\r
 \r
                 this.SelectedDenoisePreset = this.CurrentTask.Denoise == Denoise.hqdn3d ? DenoisePreset.Weak : DenoisePreset.Ultralight; // Default so we don't have an invalid preset.\r
@@ -400,7 +393,6 @@ namespace HandBrakeWPF.ViewModels
                 this.NotifyOfPropertyChange(() => this.SelectedDetelecine);\r
 \r
                 // Show / Hide the Custom Control\r
-                this.ShowDetelecineCustom = this.CurrentTask.Detelecine == Detelecine.Custom;\r
                 if (value != Detelecine.Custom) this.CustomDetelecine = string.Empty;\r
                 this.NotifyOfPropertyChange(() => this.ShowDetelecineCustom);\r
                 this.OnTabStatusChanged(null);\r
@@ -425,12 +417,12 @@ namespace HandBrakeWPF.ViewModels
         /// <summary>\r
         /// Gets or sets a value indicating whether ShowDenoiseCustom.\r
         /// </summary>\r
-        public bool ShowDenoiseCustom { get; set; }\r
+        public bool ShowDenoiseCustom => this.CurrentTask.DenoisePreset == DenoisePreset.Custom;\r
 \r
         /// <summary>\r
         /// Gets or sets a value indicating whether ShowDetelecineCustom.\r
         /// </summary>\r
-        public bool ShowDetelecineCustom { get; set; }\r
+        public bool ShowDetelecineCustom => this.CurrentTask.Detelecine == Detelecine.Custom;\r
 \r
         /// <summary>\r
         /// Gets or sets the selected deinterlace filter mode.\r
@@ -451,22 +443,6 @@ namespace HandBrakeWPF.ViewModels
                 this.deinterlaceFilter = value;\r
                 this.CurrentTask.DeinterlaceFilter = value;\r
 \r
-                if (this.deinterlaceFilter == DeinterlaceFilter.Yadif)\r
-                {\r
-                    this.IsDeinterlaceMode = true;\r
-                    this.IsDecombMode = false;\r
-                }\r
-                else if (this.deinterlaceFilter == DeinterlaceFilter.Decomb)\r
-                {\r
-                    this.IsDeinterlaceMode = false;\r
-                    this.IsDecombMode = true;\r
-                }\r
-                else\r
-                {\r
-                    this.IsDeinterlaceMode = false;\r
-                    this.IsDecombMode = false;\r
-                }\r
-\r
                 this.NotifyOfPropertyChange(() => this.SelectedDeinterlaceFilter);\r
                 this.NotifyOfPropertyChange(() => this.IsDeinterlaceMode);\r
                 this.NotifyOfPropertyChange(() => this.IsDecombMode);\r
@@ -481,12 +457,12 @@ namespace HandBrakeWPF.ViewModels
         /// <summary>\r
         /// Gets or sets a value indicating whether is deinterlace mode.\r
         /// </summary>\r
-        public bool IsDeinterlaceMode { get; set; }\r
+        public bool IsDeinterlaceMode => this.deinterlaceFilter == DeinterlaceFilter.Yadif;\r
 \r
         /// <summary>\r
         /// Gets or sets a value indicating whether is decomb mode.\r
         /// </summary>\r
-        public bool IsDecombMode { get; set; }\r
+        public bool IsDecombMode => this.deinterlaceFilter == DeinterlaceFilter.Decomb;\r
 \r
         /// <summary>\r
         /// Gets or sets a value indicating whether is deinterlace or decomb mode.\r
@@ -527,7 +503,6 @@ namespace HandBrakeWPF.ViewModels
                 this.NotifyOfPropertyChange(() => this.SelectedDenoisePreset);\r
 \r
                 // Show / Hide the Custom Control\r
-                this.ShowDenoiseCustom = this.CurrentTask.DenoisePreset == DenoisePreset.Custom;\r
                 if (value != DenoisePreset.Custom) this.CustomDenoise = string.Empty;\r
                 this.NotifyOfPropertyChange(() => this.ShowDenoiseCustom);\r
                 this.NotifyOfPropertyChange(() => this.ShowDenoiseOptions);\r
@@ -721,29 +696,11 @@ namespace HandBrakeWPF.ViewModels
             }\r
         }\r
 \r
-        public bool ShowSharpenTune\r
-        {\r
-            get\r
-            {\r
-                return this.SelectedSharpenPreset != null && this.SelectedSharpenPreset.DisplayName != "Custom";\r
-            }\r
-        }\r
+        public bool ShowSharpenTune => this.SelectedSharpenPreset != null && this.SelectedSharpenPreset.DisplayName != "Custom";\r
 \r
-        public bool ShowSharpenCustom\r
-        {\r
-            get\r
-            {\r
-                return this.SelectedSharpenPreset != null && this.SelectedSharpenPreset.DisplayName == "Custom";\r
-            }\r
-        }\r
+        public bool ShowSharpenCustom => this.SelectedSharpenPreset != null && this.SelectedSharpenPreset.DisplayName == "Custom";\r
 \r
-        public bool ShowSharpenOptions\r
-        {\r
-            get\r
-            {\r
-                return this.SelectedSharpen != Sharpen.Off;\r
-            }\r
-        }\r
+        public bool ShowSharpenOptions => this.SelectedSharpen != Sharpen.Off;\r
 \r
         #endregion\r
 \r
@@ -839,18 +796,37 @@ namespace HandBrakeWPF.ViewModels
             this.NotifyOfPropertyChange(() => this.SelectedDetelecine);\r
             this.NotifyOfPropertyChange(() => this.Grayscale);\r
             this.NotifyOfPropertyChange(() => this.DeblockValue);\r
+            this.NotifyOfPropertyChange(() => this.SelectedSharpen);\r
+            this.NotifyOfPropertyChange(() => this.SelectedSharpenPreset);\r
+            this.NotifyOfPropertyChange(() => this.SelectedSharpenTune);\r
+            this.NotifyOfPropertyChange(() => this.SelectedCombDetectPreset);\r
+            this.NotifyOfPropertyChange(() => this.SelectedDenoisePreset);\r
+            this.NotifyOfPropertyChange(() => this.SelectedDenoiseTune);\r
+            this.NotifyOfPropertyChange(() => this.FlipVideo);\r
+            this.NotifyOfPropertyChange(() => this.SelectedRotation);\r
 \r
             this.NotifyOfPropertyChange(() => this.CustomDecomb);\r
             this.NotifyOfPropertyChange(() => this.CustomDeinterlace);\r
             this.NotifyOfPropertyChange(() => this.CustomDetelecine);\r
             this.NotifyOfPropertyChange(() => this.CustomDenoise);\r
+            this.NotifyOfPropertyChange(() => this.CustomSharpen);\r
+            this.NotifyOfPropertyChange(() => this.CustomCombDetect);\r
 \r
             this.NotifyOfPropertyChange(() => this.IsDeinterlaceMode);\r
             this.NotifyOfPropertyChange(() => this.IsDecombMode);\r
             this.NotifyOfPropertyChange(() => this.IsDeinterlaceDecomb);\r
 \r
-            this.NotifyOfPropertyChange(() => this.FlipVideo);\r
-            this.NotifyOfPropertyChange(() => this.SelectedRotation);\r
+            this.NotifyOfPropertyChange(() => this.ShowDenoiseOptions);\r
+            this.NotifyOfPropertyChange(() => this.ShowDenoiseCustom);\r
+            this.NotifyOfPropertyChange(() => this.ShowDenoiseTune);\r
+            this.NotifyOfPropertyChange(() => this.ShowDecombCustom);\r
+            this.NotifyOfPropertyChange(() => this.ShowCombDetectCustom);\r
+            this.NotifyOfPropertyChange(() => this.ShowDeinterlaceDecombCustom);\r
+            this.NotifyOfPropertyChange(() => this.ShowDeinterlaceCustom);\r
+            this.NotifyOfPropertyChange(() => this.ShowDetelecineCustom);       \r
+            this.NotifyOfPropertyChange(() => this.ShowSharpenCustom);\r
+            this.NotifyOfPropertyChange(() => this.ShowSharpenOptions);\r
+            this.NotifyOfPropertyChange(() => this.ShowSharpenTune);\r
         }\r
 \r
         public bool MatchesPreset(Preset preset)\r