mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 04:34:59 +00:00
optimize<CreateBranch>: 增加一个对于空仓库建立分支的错误提示
This commit is contained in:
parent
f4237efaa2
commit
8191758a97
3 changed files with 7 additions and 1 deletions
|
@ -401,7 +401,11 @@ namespace SourceGit.Views.Widgets {
|
|||
|
||||
private void OpenNewBranch(object sender, RoutedEventArgs e) {
|
||||
var current = repo.Branches.Find(x => x.IsCurrent);
|
||||
if (current != null) new Popups.CreateBranch(repo, current).Show();
|
||||
if (current != null) {
|
||||
new Popups.CreateBranch(repo, current).Show();
|
||||
} else {
|
||||
Models.Exception.Raise(App.Text("CreateBranch.Idle"));
|
||||
}
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue