mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-23 20:47:25 -08:00
fix<WorkingCopyChanges>: missing context menu items for staged changes; update DiffTarget when items changed
This commit is contained in:
parent
0c6a0bed06
commit
af92bbd9b7
1 changed files with 8 additions and 0 deletions
|
@ -177,6 +177,8 @@ namespace SourceGit.Views.Widgets {
|
|||
if (!newSet.ContainsKey(old.Path)) {
|
||||
Changes.RemoveAt(i);
|
||||
RemoveTreeNode(Nodes, old);
|
||||
if (modeTree.Selected.Contains(old)) modeTree.Selected.Remove(old);
|
||||
if (DiffTarget == old) DiffTarget = null;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -184,6 +186,8 @@ namespace SourceGit.Views.Widgets {
|
|||
if (cur.Index != old.Index || cur.WorkTree != old.WorkTree) {
|
||||
Changes.RemoveAt(i);
|
||||
RemoveTreeNode(Nodes, old);
|
||||
if (modeTree.Selected.Contains(old)) modeTree.Selected.Remove(old);
|
||||
if (DiffTarget == old) DiffTarget = null;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -619,6 +623,10 @@ namespace SourceGit.Views.Widgets {
|
|||
Clipboard.SetText(node.Path);
|
||||
e.Handled = true;
|
||||
};
|
||||
|
||||
menu.Items.Add(explore);
|
||||
menu.Items.Add(unstage);
|
||||
menu.Items.Add(copyPath);
|
||||
} else {
|
||||
var unstage = new MenuItem();
|
||||
unstage.Header = App.Text("FileCM.UnstageMulti", files.Count);
|
||||
|
|
Loading…
Reference in a new issue