mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-23 13:45:34 +08:00
allow image conversion when multiple files are selected.
This commit is contained in:
parent
5ae98b4a0d
commit
629a062b71
@ -366,7 +366,7 @@
|
||||
<CommandBinding Command="{x:Static local:Commands.DeleteItem}" Executed="DeleteItemExec" CanExecute="CanExecuteOnPhysicalFile" />
|
||||
<CommandBinding Command="{x:Static local:Commands.RenameItem}" Executed="RenameItemExec" CanExecute="CanExecuteInDirectory" />
|
||||
<CommandBinding Command="{x:Static local:Commands.ExploreItem}" Executed="ExploreItemExec" CanExecute="CanExecuteInDirectory" />
|
||||
<CommandBinding Command="{x:Static local:Commands.ConvertImage}" Executed="ConvertImageExec" CanExecute="CanExecuteOnImage" />
|
||||
<CommandBinding Command="{x:Static local:Commands.ConvertImage}" Executed="ConvertImageExec" CanExecute="CanExecuteConvertImage" />
|
||||
<CommandBinding Command="{x:Static local:Commands.SortBy}" Executed="SortByExec" CanExecute="CanExecuteAlways"/>
|
||||
<CommandBinding Command="{x:Static local:Commands.GoBack}" Executed="GoBackExec" CanExecute="CanExecuteGoBack"/>
|
||||
<CommandBinding Command="{x:Static local:Commands.GoForward}" Executed="GoForwardExec" CanExecute="CanExecuteGoForward"/>
|
||||
|
@ -1056,6 +1056,18 @@ namespace GARbro.GUI
|
||||
e.CanExecute = CurrentDirectory.SelectedIndex != -1;
|
||||
}
|
||||
|
||||
private void CanExecuteConvertImage (object sender, CanExecuteRoutedEventArgs e)
|
||||
{
|
||||
if (CurrentDirectory.SelectedItems.Count > 1)
|
||||
{
|
||||
e.CanExecute = !ViewModel.IsArchive;
|
||||
}
|
||||
else
|
||||
{
|
||||
CanExecuteOnImage (sender, e);
|
||||
}
|
||||
}
|
||||
|
||||
private void CanExecuteOnImage (object sender, CanExecuteRoutedEventArgs e)
|
||||
{
|
||||
var entry = CurrentDirectory.SelectedItem as EntryViewModel;
|
||||
|
Loading…
Reference in New Issue
Block a user