버그 수정

This commit is contained in:
logonkhi
2025-11-14 19:54:04 +09:00
parent 934fff54a7
commit 235b4bc28a
18 changed files with 669 additions and 293 deletions

View File

@@ -56,28 +56,28 @@ namespace UVC.UI.List.Tree
#endregion
#region (Private Fields)
#region (protected Fields)
/// <summary>고유 식별자(Id).</summary>
private readonly Guid _id = Guid.NewGuid();
protected Guid _id = Guid.NewGuid();
/// <summary>아이템 이름.</summary>
private string _name = string.Empty;
protected string _name = string.Empty;
/// <summary>추가 옵션 문자열.</summary>
private string _option = string.Empty;
protected string _option = string.Empty;
/// <summary>자식 펼침 여부.</summary>
private bool _isExpanded = false;
protected bool _isExpanded = false;
/// <summary>선택 여부.</summary>
private bool _isSelected = false;
protected bool _isSelected = false;
/// <summary>부모</summary>
private TreeListItemData? _parent;
protected TreeListItemData? _parent;
/// <summary>자식 리스트.</summary>
private List<TreeListItemData> _children = new List<TreeListItemData>();
protected List<TreeListItemData> _children = new List<TreeListItemData>();
#endregion
@@ -121,7 +121,7 @@ namespace UVC.UI.List.Tree
/// 펼침 상태(같은 어셈블리 내 전용).
/// 변경 시 OnDataChanged(Expanded) 발생.
/// </summary>
internal bool IsExpanded
public bool IsExpanded
{
get => _isExpanded;
set
@@ -399,10 +399,14 @@ namespace UVC.UI.List.Tree
public TreeListItemData CloneWithChild()
{
TreeListItemData clone = new TreeListItemData();
clone._id = this.Id;
clone.Name = this.Name;
clone.Option = this.Option;
clone.IsExpanded = this.IsExpanded;
clone.IsSelected = this.IsSelected;
clone.OnClickAction = this.OnClickAction;
clone.OnSelectionChanged = this.OnSelectionChanged;
clone.OnDataChanged = this.OnDataChanged;
foreach (var child in this.Children)
{
clone.AddChild(child.CloneWithChild());
@@ -414,13 +418,17 @@ namespace UVC.UI.List.Tree
/// 현재 인스턴스의 복사본인 <see cref="TreeListItemData"/>의 새 인스턴스를 생성합니다.
/// </summary>
/// <returns>현재 인스턴스와 동일한 속성 값을 가진 새 <see cref="TreeListItemData"/> 객체를 생성합니다.</returns>
public TreeListItemData Clone()
public virtual TreeListItemData Clone()
{
TreeListItemData clone = new TreeListItemData();
clone._id = this.Id;
clone.Name = this.Name;
clone.Option = this.Option;
clone.IsExpanded = this.IsExpanded;
clone.IsSelected = this.IsSelected;
clone.OnClickAction = this.OnClickAction;
clone.OnSelectionChanged = this.OnSelectionChanged;
clone.OnDataChanged = this.OnDataChanged;
return clone;
}
@@ -442,5 +450,6 @@ namespace UVC.UI.List.Tree
AddCloneChild,
AddCloneAtChild,
SwapChild,
TailButtons,// 향후 버튼 관련 변경 추가 가능
}
}