Focus Entry field when a Combobox receives the focus for first time

This is a partial revert of a0c2237839 patch.
This commit is contained in:
David Capello 2015-08-24 16:45:35 -03:00
parent 434059d517
commit 46309fe68d

View File

@ -364,6 +364,17 @@ bool ComboBox::onProcessMessage(Message* msg)
}
break;
case kFocusEnterMessage:
// Here we focus the entry field only if the combobox is
// editable and receives the focus in a direct way (e.g. when
// the window was just opened and the combobox is the first
// child or has the "focus magnet" flag enabled.)
if ((isEditable()) &&
(getManager()->getFocus() == this)) {
m_entry->requestFocus();
}
break;
}
return Widget::onProcessMessage(msg);