widgets-toolbox icon indicating copy to clipboard operation
widgets-toolbox copied to clipboard

List Selector (two pane) can crash MATLAB due to HighlightedValue being empty in the set method

Open rjackey opened this issue 6 months ago • 3 comments

g3198185 - The error comes from ListSelectorTwoPane.m. The following update is proposed:

    function set.HighlightedValue(obj,value)
        if isempty(value)
            return;
        end
        if isempty(obj.ItemsData)
            [~, obj.RightList.Value] = ismember(value, obj.Items);
        else
            [~, obj.RightList.Value] = ismember(value, obj.ItemsData);
        end
    end

rjackey avatar Jan 08 '24 13:01 rjackey