From 27ca9ad55645897010fd40e8f8cf8a38ebaa471a Mon Sep 17 00:00:00 2001 From: Igor Korot Date: Tue, 22 Nov 2016 01:55:27 +0100 Subject: [PATCH] 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. --- src/osx/listbox_osx.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/osx/listbox_osx.cpp b/src/osx/listbox_osx.cpp index 82c9de9d07..85a437862c 100644 --- a/src/osx/listbox_osx.cpp +++ b/src/osx/listbox_osx.cpp @@ -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;