mirror of https://github.com/buggins/dlangui.git
Fixed double item selection on combo list when changing selected item from code.
This commit is contained in:
parent
23ff14f8e8
commit
767aa4bdbe
|
@ -68,6 +68,9 @@ class ComboBoxBase : HorizontalLayout, OnClickHandler {
|
|||
@property ComboBoxBase selectedItemIndex(int index) {
|
||||
if (_selectedItemIndex == index)
|
||||
return this;
|
||||
if (_selectedItemIndex != -1) {
|
||||
_adapter.resetItemState(_selectedItemIndex, State.Selected | State.Focused | State.Hovered);
|
||||
}
|
||||
_selectedItemIndex = index;
|
||||
if (itemClick.assigned)
|
||||
itemClick(this, index);
|
||||
|
|
Loading…
Reference in New Issue