mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-24 10:50:52 +08:00
enhance: simpfy the way to lock a worktree
This commit is contained in:
@@ -1731,8 +1731,11 @@ namespace SourceGit.ViewModels
|
||||
loc.Icon = App.CreateMenuIcon("Icons.Lock");
|
||||
loc.Click += (o, ev) =>
|
||||
{
|
||||
if (PopupHost.CanCreatePopup())
|
||||
PopupHost.ShowPopup(new LockWorktree(this, worktree));
|
||||
SetWatcherEnabled(false);
|
||||
var succ = new Commands.Worktree(_fullpath).Lock(worktree.FullPath);
|
||||
if (succ)
|
||||
worktree.IsLocked = true;
|
||||
SetWatcherEnabled(true);
|
||||
ev.Handled = true;
|
||||
};
|
||||
menu.Items.Add(loc);
|
||||
|
||||
Reference in New Issue
Block a user