Available values List<Custom Class> selected value disappears in GUI after plan reload
Environment:
Windows 10, 64-bit
OpenTAP 9.9.2
Steps to reproduce: Copy code below to any test step
public class TestItem
{
public string ItemName { get; set; }
public override string ToString()
{
return ItemName ?? "No value available";
}
}
[Display("Editable String List")]
public List<TestItem> TestList { get; set; } = new List<TestItem>();
[Display("Select String From List")]
[AvailableValues(nameof(TestList))]
public TestItem TestValue { get; set; }
Example Using different class and item names with same functionality.
-
Select value from List (AvailableValues)
"Available value selected"
-
Make TAP reload plan, e.g. by modifying instrument setting and pressing OK
Plan reloaded.
Actual result:
- Selected value does not show in GUI anymore
Expected result:
Selected value should still be visible
Other remarks: The value is still selected?, it just does not show to the user anymore.
Edited by Atte Hautamaki