Invalidate wxOSX wxListBox best size after adding items to it

Make wxListBox behave the same as in the other ports and invalidate its best
size after inserting items into it.

In the future it would be nice to call this from the base wxWindowWithItems
class itself, rather than doing it in port-specific DoInsertItems() for all
ports, but for now this will do.

Closes #17606.
This commit is contained in:
Igor Korot
2016-11-22 01:55:27 +01:00
committed by Vadim Zeitlin
parent 28f96bdff0
commit 27ca9ad556

View File

@@ -377,6 +377,8 @@ int wxListBox::DoInsertItems(const wxArrayStringsAdapter& items,
// get the first visible item so for now do at least this.
SetFirstItem(startpos);
InvalidateBestSize();
UpdateOldSelections();
return idx;