Don't popup an empty listbox if the combobox is editable and has open-on-click style

This commit is contained in:
David Capello 2015-05-06 13:07:54 -03:00
parent a0ea3ae07b
commit a30f374bd5

View File

@ -436,7 +436,9 @@ bool ComboBoxEntry::onProcessMessage(Message* msg)
break;
case kMouseDownMessage:
if (m_comboBox->isClickOpen()) {
if (m_comboBox->isClickOpen() &&
(!m_comboBox->isEditable() ||
!m_comboBox->m_items.empty())) {
m_comboBox->switchListBox();
}