Skip to content

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.

  1. Select value from List (AvailableValues) image "Available value selected"

  2. Make TAP reload plan, e.g. by modifying instrument setting and pressing OK

image

Plan reloaded.

Actual result:

  1. Selected value does not show in GUI anymore

image

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