1
0
mirror of synced 2024-11-28 09:20:57 +01:00

Some error fixes

This commit is contained in:
KillzXGaming 2020-09-12 16:50:05 -04:00
parent f227f30e04
commit 39910a721b
2 changed files with 9 additions and 3 deletions

View File

@ -866,6 +866,8 @@ namespace LayoutBXLYT
public class UserData : SectionCommon
{
public bool Edited = false;
public List<UserDataEntry> Entries { get; set; }
public UserData()

View File

@ -116,12 +116,12 @@ namespace LayoutBXLYT
bool IsEdited = EditData();
if (IsEdited)
{
ActiveUserData.Edited = true;
ActiveUserData.Entries.Add(userDataNew);
LoadUserData(userDataNew);
}
}
private bool EditData()
{
if (SelectedEntry != null)
{
@ -155,9 +155,11 @@ namespace LayoutBXLYT
if (parser.Type == UserDataType.String)
SelectedEntry.SetValue(parser.GetStringASCII());
if (ActiveUserData == null)
if (ActiveUserData == null) {
ActiveUserData = activePane.CreateUserData();
}
ActiveUserData.Edited = true;
LoadUserData(activePane, ActiveUserData);
return true;
}
@ -172,8 +174,10 @@ namespace LayoutBXLYT
int index = listViewCustom1.SelectedIndices[0];
listViewCustom1.Items.RemoveAt(index);
if (ActiveUserData != null)
if (ActiveUserData != null) {
ActiveUserData.Entries.RemoveAt(index);
ActiveUserData.Edited = true;
}
}
}