Some error fixes
This commit is contained in:
parent
f227f30e04
commit
39910a721b
@ -866,6 +866,8 @@ namespace LayoutBXLYT
|
|||||||
|
|
||||||
public class UserData : SectionCommon
|
public class UserData : SectionCommon
|
||||||
{
|
{
|
||||||
|
public bool Edited = false;
|
||||||
|
|
||||||
public List<UserDataEntry> Entries { get; set; }
|
public List<UserDataEntry> Entries { get; set; }
|
||||||
|
|
||||||
public UserData()
|
public UserData()
|
||||||
|
@ -116,12 +116,12 @@ namespace LayoutBXLYT
|
|||||||
bool IsEdited = EditData();
|
bool IsEdited = EditData();
|
||||||
if (IsEdited)
|
if (IsEdited)
|
||||||
{
|
{
|
||||||
|
ActiveUserData.Edited = true;
|
||||||
ActiveUserData.Entries.Add(userDataNew);
|
ActiveUserData.Entries.Add(userDataNew);
|
||||||
LoadUserData(userDataNew);
|
LoadUserData(userDataNew);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private bool EditData()
|
private bool EditData()
|
||||||
|
|
||||||
{
|
{
|
||||||
if (SelectedEntry != null)
|
if (SelectedEntry != null)
|
||||||
{
|
{
|
||||||
@ -155,9 +155,11 @@ namespace LayoutBXLYT
|
|||||||
if (parser.Type == UserDataType.String)
|
if (parser.Type == UserDataType.String)
|
||||||
SelectedEntry.SetValue(parser.GetStringASCII());
|
SelectedEntry.SetValue(parser.GetStringASCII());
|
||||||
|
|
||||||
if (ActiveUserData == null)
|
if (ActiveUserData == null) {
|
||||||
ActiveUserData = activePane.CreateUserData();
|
ActiveUserData = activePane.CreateUserData();
|
||||||
|
}
|
||||||
|
|
||||||
|
ActiveUserData.Edited = true;
|
||||||
LoadUserData(activePane, ActiveUserData);
|
LoadUserData(activePane, ActiveUserData);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -172,8 +174,10 @@ namespace LayoutBXLYT
|
|||||||
int index = listViewCustom1.SelectedIndices[0];
|
int index = listViewCustom1.SelectedIndices[0];
|
||||||
listViewCustom1.Items.RemoveAt(index);
|
listViewCustom1.Items.RemoveAt(index);
|
||||||
|
|
||||||
if (ActiveUserData != null)
|
if (ActiveUserData != null) {
|
||||||
ActiveUserData.Entries.RemoveAt(index);
|
ActiveUserData.Entries.RemoveAt(index);
|
||||||
|
ActiveUserData.Edited = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user