mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-25 21:07:20 -08:00
fix: wired ordering when cherry-pick multiple commits (#726)
Since the items in `ListBox.SelectedItems` are not ordered by their position in the list, but in the order user selected, it need be sorted before `cherry-pick` Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
142987f73d
commit
a980cc987d
1 changed files with 6 additions and 0 deletions
|
@ -243,6 +243,12 @@ namespace SourceGit.ViewModels
|
|||
|
||||
if (canCherryPick)
|
||||
{
|
||||
// Sort selected commits in order.
|
||||
selected.Sort((l, r) =>
|
||||
{
|
||||
return _commits.IndexOf(r) - _commits.IndexOf(l);
|
||||
});
|
||||
|
||||
var cherryPickMultiple = new MenuItem();
|
||||
cherryPickMultiple.Header = App.Text("CommitCM.CherryPickMultiple");
|
||||
cherryPickMultiple.Icon = App.CreateMenuIcon("Icons.CherryPick");
|
||||
|
|
Loading…
Reference in a new issue