From 787a0d022c056bd89e9416c481c3562d3ebe3e7d Mon Sep 17 00:00:00 2001 From: alcexhim Date: Fri, 22 Aug 2014 08:43:27 -0400 Subject: [PATCH] Fixed some bugs and added feature for comments before and after groups --- .../ObjectModels/PropertyList/Group.cs | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/CSharp/Plugins/UniversalEditor.Essential/ObjectModels/PropertyList/Group.cs b/CSharp/Plugins/UniversalEditor.Essential/ObjectModels/PropertyList/Group.cs index aac6f979..c44ec575 100644 --- a/CSharp/Plugins/UniversalEditor.Essential/ObjectModels/PropertyList/Group.cs +++ b/CSharp/Plugins/UniversalEditor.Essential/ObjectModels/PropertyList/Group.cs @@ -183,6 +183,10 @@ namespace UniversalEditor.ObjectModels.PropertyList { clone.Properties.Add(p.Clone() as Property); } + clone.IsDefined = mvarIsDefined; + clone.CommentBefore = (mvarCommentBefore.Clone() as string); + clone.CommentAfter = (mvarCommentAfter.Clone() as string); + clone.Name = (mvarName.Clone() as string); return clone; } @@ -203,6 +207,9 @@ namespace UniversalEditor.ObjectModels.PropertyList { mvarGroups.Clear(); mvarProperties.Clear(); + mvarIsDefined = true; + mvarCommentBefore = String.Empty; + mvarCommentAfter = String.Empty; mvarName = String.Empty; ResetEmpty(); } @@ -214,9 +221,15 @@ namespace UniversalEditor.ObjectModels.PropertyList private bool mvarIsDefined = true; public bool IsDefined { get { return mvarIsDefined; } set { mvarIsDefined = value; } } - public override string ToString() - { - return mvarName + " [" + mvarGroups.Count.ToString() + " groups, " + mvarProperties.Count.ToString() + " properties]"; - } + private string mvarCommentBefore = String.Empty; + public string CommentBefore { get { return mvarCommentBefore; } set { mvarCommentBefore = value; } } + + private string mvarCommentAfter = String.Empty; + public string CommentAfter { get { return mvarCommentAfter; } set { mvarCommentAfter = value; } } + + public override string ToString() + { + return mvarName + " [" + mvarGroups.Count.ToString() + " groups, " + mvarProperties.Count.ToString() + " properties]"; + } } }