Skip to content

Commit

Permalink
new CfgGitGroup clone method
Browse files Browse the repository at this point in the history
  • Loading branch information
digao-dalpiaz committed Aug 16, 2023
1 parent f72f3d0 commit 3b68de6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions DigaoDeskApp/Config/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ public override string ToString()
return Ident;
}

public CfgGitGroup Clone()
{
return (CfgGitGroup)MemberwiseClone();
}

public void InitUUID()
{
UUID = Guid.NewGuid();
Expand Down
5 changes: 4 additions & 1 deletion DigaoDeskApp/Config/FrmConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,10 @@ private void LoadSettings()

//--Repos tab
_gitGroups = new();
_gitGroups.AddRange(Vars.Config.Repos.GitGroups);
foreach (var item in Vars.Config.Repos.GitGroups)
{
_gitGroups.Add(item.Clone());
}
_bindGitGroups = new(_gitGroups);
listGitGroups.DataSource = _bindGitGroups;
UpdateGitGroupButtons();
Expand Down

0 comments on commit 3b68de6

Please sign in to comment.