Skip to content

Commit 24e9b21

Browse files
Update REC subobjects when storage location is changed, this is a GUI only fix and should has no impact on output files
1 parent eaf0b5e commit 24e9b21

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

‎EDSTest/DeviceODView.cs‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,18 @@ private void button_save_changes_Click(object sender, EventArgs e)
152152
}
153153
}
154154

155+
//If we edit a parent REC object we also need to change the storage location of subobjects
156+
//this does occur implicity anyway and it also occurs during load of file but the GUI was displaying
157+
//incorrect data in the shaded combobox item for storage location
158+
if (selectedobject.parent == null && selectedobject.objecttype == ObjectType.REC)
159+
{
160+
foreach (KeyValuePair<UInt16, ODentry> kvp in selectedobject.subobjects)
161+
{
162+
ODentry subod = kvp.Value;
163+
subod.location = selectedobject.location;
164+
}
165+
}
166+
155167

156168
updateselectedindexdisplay(selectedobject.index);
157169
validateanddisplaydata();

0 commit comments

Comments
 (0)