mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-20 19:55:00 +00:00
enhance: simpfy the way to lock a worktree
This commit is contained in:
parent
8a8aabede3
commit
fa2c7c0e18
10 changed files with 25 additions and 125 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue