From 50892f7401529649e54aada5f695f29a358bfb03 Mon Sep 17 00:00:00 2001 From: leo Date: Fri, 20 Dec 2024 10:00:10 +0800 Subject: [PATCH] ux: re-order context menu items for selected multiple branches --- src/Views/BranchTree.axaml.cs | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/Views/BranchTree.axaml.cs b/src/Views/BranchTree.axaml.cs index bb9b886f..e5460866 100644 --- a/src/Views/BranchTree.axaml.cs +++ b/src/Views/BranchTree.axaml.cs @@ -399,15 +399,6 @@ namespace SourceGit.Views else if (branches.Find(x => x.IsCurrent) == null) { var menu = new ContextMenu(); - var deleteMulti = new MenuItem(); - deleteMulti.Header = App.Text("BranchCM.DeleteMultiBranches", branches.Count); - deleteMulti.Icon = App.CreateMenuIcon("Icons.Clear"); - deleteMulti.Click += (_, ev) => - { - repo.DeleteMultipleBranches(branches, branches[0].IsLocal); - ev.Handled = true; - }; - menu.Items.Add(deleteMulti); var mergeMulti = new MenuItem(); mergeMulti.Header = App.Text("BranchCM.MergeMultiBranches", branches.Count); @@ -418,6 +409,17 @@ namespace SourceGit.Views ev.Handled = true; }; menu.Items.Add(mergeMulti); + menu.Items.Add(new MenuItem() { Header = "-" }); + + var deleteMulti = new MenuItem(); + deleteMulti.Header = App.Text("BranchCM.DeleteMultiBranches", branches.Count); + deleteMulti.Icon = App.CreateMenuIcon("Icons.Clear"); + deleteMulti.Click += (_, ev) => + { + repo.DeleteMultipleBranches(branches, branches[0].IsLocal); + ev.Handled = true; + }; + menu.Items.Add(deleteMulti); menu?.Open(this); }