mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-16 16:05:00 +00:00
feature: supports re-order custom actions (#1346)
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
ee2e7d0127
commit
98041c803e
5 changed files with 98 additions and 18 deletions
|
@ -453,5 +453,19 @@ namespace SourceGit.Models
|
|||
if (act != null)
|
||||
CustomActions.Remove(act);
|
||||
}
|
||||
|
||||
public void MoveCustomActionUp(CustomAction act)
|
||||
{
|
||||
var idx = CustomActions.IndexOf(act);
|
||||
if (idx > 0)
|
||||
CustomActions.Move(idx - 1, idx);
|
||||
}
|
||||
|
||||
public void MoveCustomActionDown(CustomAction act)
|
||||
{
|
||||
var idx = CustomActions.IndexOf(act);
|
||||
if (idx < CustomActions.Count - 1)
|
||||
CustomActions.Move(idx + 1, idx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue