Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 897329c

Browse files
should disable the remove and dupliate button if there is no selection
1 parent 4698002 commit 897329c

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

‎src/Views/Preferences.axaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -605,13 +605,15 @@
605605
<Button Grid.Column="1"
606606
Classes="icon_button"
607607
Width="28" Height="28"
608-
Click="OnRemoveSelectedCustomAction">
608+
Click="OnRemoveSelectedCustomAction"
609+
IsEnabled="{Binding #ThisControl.SelectedCustomAction, Converter={x:Static ObjectConverters.IsNotNull}}">
609610
<Path Width="14" Height="14" Data="{StaticResource Icons.Minus}"/>
610611
</Button>
611612
<Button Grid.Column="2"
612613
Classes="icon_button"
613614
Width="28" Height="28"
614-
Click="OnDuplicateSelectedCustomAction">
615+
Click="OnDuplicateSelectedCustomAction"
616+
IsEnabled="{Binding #ThisControl.SelectedCustomAction, Converter={x:Static ObjectConverters.IsNotNull}}">
615617
<Path Width="14" Height="14" Data="{StaticResource Icons.Copy}"/>
616618
</Button>
617619
<Button Grid.Column="4"

‎src/Views/RepositoryConfigure.axaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,13 +434,15 @@
434434
<Button Grid.Column="1"
435435
Classes="icon_button"
436436
Width="28" Height="28"
437-
Command="{Binding RemoveSelectedCustomAction}">
437+
Command="{Binding RemoveSelectedCustomAction}"
438+
IsEnabled="{Binding SelectedCustomAction, Converter={x:Static ObjectConverters.IsNotNull}}">
438439
<Path Width="14" Height="14" Data="{StaticResource Icons.Minus}"/>
439440
</Button>
440441
<Button Grid.Column="2"
441442
Classes="icon_button"
442443
Width="28" Height="28"
443-
Command="{Binding DuplicateSelectedCustomAction}">
444+
Command="{Binding DuplicateSelectedCustomAction}"
445+
IsEnabled="{Binding SelectedCustomAction, Converter={x:Static ObjectConverters.IsNotNull}}">
444446
<Path Width="14" Height="14" Data="{StaticResource Icons.Copy}"/>
445447
</Button>
446448
<Button Grid.Column="4"

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /