Skip to content

Commit

Permalink
Merge pull request #58 from mathworks/57-list-selector-two-pane-can-c…
Browse files Browse the repository at this point in the history
…rash-matlab-due-to-highlightedvalue-being-empty-in-the-set-method

Update to widgets/+wt/ListSelectorTwoPane.m
  • Loading branch information
rjackey authored Jan 12, 2024
2 parents 6ab43e5 + 5a61cd1 commit 58a365f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion widgets/+wt/ListSelectorTwoPane.m
Original file line number Diff line number Diff line change
Expand Up @@ -485,8 +485,11 @@ function shiftListBoxIndex(obj, shift)
else
value = obj.ItemsData(:,selIdx);
end
end
end
function set.HighlightedValue(obj,value)
if isempty(value)
return;
end
if isempty(obj.ItemsData)
[~, obj.RightList.Value] = ismember(value, obj.Items);
else
Expand Down

0 comments on commit 58a365f

Please sign in to comment.