]> granicus.if.org Git - handbrake/commitdiff
WinGui: Bug fixes on the subtitles panel.
authorsr55 <sr55.hb@outlook.com>
Mon, 21 May 2012 00:02:21 +0000 (00:02 +0000)
committersr55 <sr55.hb@outlook.com>
Mon, 21 May 2012 00:02:21 +0000 (00:02 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4694 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs
win/CS/HandBrakeWPF/Views/SubtitlesView.xaml

index b4d8d65aba0551818f6e27f4a8f935f44473a09b..515b25eb93d01d39bf2134a0473bb7f7aace6484 100644 (file)
@@ -190,9 +190,12 @@ namespace HandBrakeWPF.ViewModels
         {\r
             foreach (SubtitleTrack track in this.Task.SubtitleTracks)\r
             {\r
+                if (track == subtitle)\r
+                {\r
+                    continue; // Skip the track the user selected.\r
+                }\r
                 track.Default = false;\r
             }\r
-            subtitle.Default = true;\r
 \r
             this.NotifyOfPropertyChange(() => this.Task);\r
         }\r
@@ -207,9 +210,12 @@ namespace HandBrakeWPF.ViewModels
         {\r
             foreach (SubtitleTrack track in this.Task.SubtitleTracks)\r
             {\r
+                if (track == subtitle)\r
+                {\r
+                    continue; // Skip the track the user selected.\r
+                }\r
                 track.Burned = false;\r
             }\r
-            subtitle.Burned = true;\r
             this.NotifyOfPropertyChange(() => this.Task);\r
         }\r
 \r
index ae87c95b1de03439d6b2cb37c2b257bba0c3cd26..a1b32527d571e570f7ecc7bd3fb2db65cabf635e 100644 (file)
                             <TextBlock Text="{Binding SrtFileName}" Grid.Column="1" VerticalAlignment="Center"\r
                                        Visibility="{Binding IsSrtSubtitle, Converter={StaticResource booleanToVisConverter}, ConverterParameter=false}" />\r
                             \r
-                            <TextBlock Text="Forced Only" FontWeight="Bold" Grid.Column="2" VerticalAlignment="Center" />\r
-                            <CheckBox Grid.Column="3" IsChecked="{Binding Forced}" VerticalAlignment="Center" Margin="5,0,5,0"/>\r
-                            <TextBlock Text="Burn In" FontWeight="Bold" Grid.Column="4" VerticalAlignment="Center" />\r
-                            <CheckBox Grid.Column="5" IsChecked="{Binding Burned}" VerticalAlignment="Center" Margin="5,0,5,0">\r
+                            <TextBlock Text="Forced Only" FontWeight="Bold" Grid.Column="2" VerticalAlignment="Center"\r
+                                       Visibility="{Binding IsSrtSubtitle, Converter={StaticResource booleanToVisConverter}, ConverterParameter=true}" />\r
+                            <CheckBox Grid.Column="3" IsChecked="{Binding Forced}" VerticalAlignment="Center" Margin="5,0,5,0"\r
+                                      Visibility="{Binding IsSrtSubtitle, Converter={StaticResource booleanToVisConverter}, ConverterParameter=true}" />\r
+                            <TextBlock Text="Burn In" FontWeight="Bold" Grid.Column="4" VerticalAlignment="Center"\r
+                                       Visibility="{Binding IsSrtSubtitle, Converter={StaticResource booleanToVisConverter}, ConverterParameter=true}"/>\r
+                            <CheckBox Grid.Column="5" IsChecked="{Binding Burned}" VerticalAlignment="Center" Margin="5,0,5,0"\r
+                                      Visibility="{Binding IsSrtSubtitle, Converter={StaticResource booleanToVisConverter}, ConverterParameter=true}">\r
                                 <i:Interaction.Triggers>\r
                                     <i:EventTrigger EventName="Click">\r
                                         <cal:ActionMessage MethodName="SelectBurnedInTrack">\r