Skip to content

Commit

Permalink
fix the order of SelectedItems
Browse files Browse the repository at this point in the history
  • Loading branch information
sonyps5201314 committed Apr 2, 2024
1 parent a39e283 commit fd52054
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions DependenciesGui/DependencyExportList.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ private void ExportListCopySelectedValues(object sender, RoutedEventArgs e)
{
selectedExports.Add((import as DisplayPeExport));
}
if (SelectedIndex != 0)
{
var firstSelectedItem = selectedExports[0];
selectedExports.Remove(firstSelectedItem);
selectedExports.Insert(SelectedIndex, firstSelectedItem);
}

var result = MessageBox.Show("Only copy the function names?", "Copy", MessageBoxButton.YesNoCancel, MessageBoxImage.Question, MessageBoxResult.Cancel);
if (result == MessageBoxResult.Cancel)
Expand Down
6 changes: 6 additions & 0 deletions DependenciesGui/DependencyImportList.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ private void ImportListCopySelectedValues(object sender, RoutedEventArgs e)
{
selectedImports.Add((import as DisplayPeImport));
}
if (SelectedIndex != 0)
{
var firstSelectedItem = selectedImports[0];
selectedImports.Remove(firstSelectedItem);
selectedImports.Insert(SelectedIndex, firstSelectedItem);
}

var result = MessageBox.Show("Only copy the function names?", "Copy", MessageBoxButton.YesNoCancel, MessageBoxImage.Question, MessageBoxResult.Cancel);
if (result == MessageBoxResult.Cancel)
Expand Down

0 comments on commit fd52054

Please sign in to comment.