Fixed ComboBox::addItem incorrectly setting the ListBox size

0.8
Bruno Van de Velde 2017-08-14 19:48:23 +02:00
parent 999fe00a63
commit 4f17ea26d6
1 changed files with 3 additions and 5 deletions

View File

@ -247,11 +247,9 @@ namespace tgui
bool ComboBox::addItem(const sf::String& item, const sf::String& id)
{
// Make room to add another item, until there are enough items
if ((m_nrOfItemsToDisplay == 0) || (m_listBox->getItemCount() < m_nrOfItemsToDisplay))
updateListBoxHeight();
return m_listBox->addItem(item, id);
const bool ret = m_listBox->addItem(item, id);
updateListBoxHeight();
return ret;
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////