wxListbook scrollbar space remains on page deletion
|Reported by:||crjjrc||Owned by:|
To see the problem, run the notebook sample, add pages with Alt-A until scrollbars appear, select the Maximized Button page, and hit Alt-D to delete the page. This page has the longest label, but when it's removed, the list control isn't resized immediately. It is resized on the next page selection. I believe the resize should happen immediately.
A fix is to unconditionally issue a size event after the page has been removed in wxListbook::DoRemovePage(). This is currently done conditionally when all pages have been removed. I'm attaching a patch that removes the condition.
This problem is present in both trunk and wx2.8.8. The patch is for trunk, but the fix can be trivially applied to wx2.8.8. I've tested it on GTK and OS X. In addition to fixing the scrollbar spacing problem, it also fixes some repaint problems in OS X that occurred when the list control narrowed (which a simple change in selection did not fix).