widgets-toolbox
widgets-toolbox copied to clipboard
List Selector (two pane) can crash MATLAB due to HighlightedValue being empty in the set method
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