mirror of https://github.com/buggins/dlangui.git
Merge pull request #330 from and3md/master
Fix selection combobox list when changing selected item from code.
This commit is contained in:
commit
494606652e
|
|
@ -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