File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,7 +6,8 @@ namespace SourceGit.Models
66 public enum BisectState
77 {
88 None = 0 ,
9- WaitingForRange ,
9+ WaitingForFirstBad ,
10+ WaitingForFirstGood ,
1011 Detecting ,
1112 }
1213
Original file line number Diff line number Diff line change @@ -212,10 +212,13 @@ public Models.BisectState UpdateBisectInfo()
212212
213213 Bisect = info ;
214214
215- if ( info . Bads . Count == 0 || info . Goods . Count == 0 )
216- return Models . BisectState . WaitingForRange ;
217- else
218- return Models . BisectState . Detecting ;
215+ if ( info . Bads . Count == 0 )
216+ return Models . BisectState . WaitingForFirstBad ;
217+
218+ if ( info . Goods . Count == 0 )
219+ return Models . BisectState . WaitingForFirstGood ;
220+
221+ return Models . BisectState . Detecting ;
219222 }
220223
221224 public void NavigateTo ( string commitSHA )
Original file line number Diff line number Diff line change 792792 FontWeight =" Bold"
793793 Margin =" 8,0"
794794 Foreground =" {DynamicResource Brush.Conflict.Foreground}"
795- Text =" {DynamicResource Text.Bisect.WaitingForRange}"
796- IsVisible =" {Binding BisectState, Converter={x:Static ObjectConverters.Equal}, ConverterParameter={x:Static m:BisectState.WaitingForRange}}" />
795+ Text =" {DynamicResource Text.Bisect.WaitingForRange}" >
796+ <TextBlock .IsVisible>
797+ <MultiBinding Converter =" {x:Static BoolConverters.Or}" >
798+ <Binding Path =" BisectState" Converter =" {x:Static ObjectConverters.Equal}" ConverterParameter =" {x:Static m:BisectState.WaitingForFirstBad}" />
799+ <Binding Path =" BisectState" Converter =" {x:Static ObjectConverters.Equal}" ConverterParameter =" {x:Static m:BisectState.WaitingForFirstGood}" />
800+ </MultiBinding >
801+ </TextBlock .IsVisible>
802+ </TextBlock >
797803
798804 <TextBlock Grid.Column=" 0"
799805 FontWeight =" Bold"
813819 FontWeight =" Regular"
814820 BorderThickness =" 0"
815821 Content =" {DynamicResource Text.Bisect.Good}"
816- IsEnabled =" {Binding !IsBisectCommandRunning}"
817822 Padding =" 8,2"
818823 Click =" OnBisectCommand"
819- Tag =" good" />
824+ Tag =" good" >
825+ <Button .IsEnabled>
826+ <MultiBinding Converter =" {x:Static BoolConverters.And}" >
827+ <Binding Path =" IsBisectCommandRunning" Converter =" {x:Static BoolConverters.Not}" />
828+ <Binding Path =" BisectState" Converter =" {x:Static ObjectConverters.NotEqual}" ConverterParameter =" {x:Static m:BisectState.WaitingForFirstBad}" />
829+ </MultiBinding >
830+ </Button .IsEnabled>
831+ </Button >
820832 <Button Grid.Column=" 3"
821833 Classes =" flat"
822834 Margin =" 4,0"
833845 FontWeight =" Regular"
834846 BorderThickness =" 0"
835847 Content =" {DynamicResource Text.Bisect.Skip}"
848+ IsVisible =" {Binding BisectState, Converter={x:Static ObjectConverters.Equal}, ConverterParameter={x:Static m:BisectState.Detecting}}"
836849 IsEnabled =" {Binding !IsBisectCommandRunning}"
837850 Padding =" 8,2"
838851 Click =" OnBisectCommand"
You can’t perform that action at this time.
0 commit comments