fix<Histories,Dashboard>: fix crash when push/pull/fetch with no remotes added into this repository

This commit is contained in:
leo 2021-05-25 17:38:42 +08:00
parent 0eae6f90af
commit 4d5e543527
2 changed files with 19 additions and 1 deletions

View file

@ -406,7 +406,7 @@ namespace SourceGit.Views.Widgets {
var push = new MenuItem();
push.Header = App.Text("BranchCM.Push", current.Name);
push.IsEnabled = dirty;
push.IsEnabled = repo.Remotes.Count > 0 && dirty;
push.Click += (o, e) => {
new Popups.Push(repo, current).Show();
e.Handled = true;
@ -579,6 +579,7 @@ namespace SourceGit.Views.Widgets {
var push = new MenuItem();
push.Header = App.Text("TagCM.Push", tag);
push.IsEnabled = repo.Remotes.Count > 0;
push.Click += (o, e) => {
new Popups.PushTag(repo, tag).Show();
e.Handled = true;