mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-21 07:20:46 +00:00
Fix combobox widget: fire Change signal when the combobox is selected with the keyboard
This commit is contained in:
parent
44d3e228fd
commit
7253fa59c5
@ -454,14 +454,9 @@ bool ComboBoxListBox::onProcessMessage(Message* msg)
|
||||
{
|
||||
switch (msg->type()) {
|
||||
|
||||
case kMouseUpMessage: {
|
||||
int index = m_comboBox->getSelectedItemIndex();
|
||||
if (isValidItem(index))
|
||||
m_comboBox->onChange();
|
||||
|
||||
case kMouseUpMessage:
|
||||
m_comboBox->closeListBox();
|
||||
return true;
|
||||
}
|
||||
|
||||
case kKeyDownMessage:
|
||||
if (hasFocus()) {
|
||||
@ -486,8 +481,10 @@ void ComboBoxListBox::onChangeSelectedItem()
|
||||
ListBox::onChangeSelectedItem();
|
||||
|
||||
int index = getSelectedIndex();
|
||||
if (isValidItem(index))
|
||||
if (isValidItem(index)) {
|
||||
m_comboBox->setSelectedItemIndex(index);
|
||||
m_comboBox->onChange();
|
||||
}
|
||||
}
|
||||
|
||||
// When the mouse is clicked we switch the visibility-status of the list-box
|
||||
|
Loading…
x
Reference in New Issue
Block a user