Fix removing and inserting pages in wxToolbook

Removing a page from wxToolbook could result in crashes due to
dereferencing the now invalid page index. Fix this by not assuming that
the page index is the same as its tool ID, but adding functions to
explicitly map one to the other.

Also fix inserting pages into wxToolbook, which worked as appending them
before.

Closes https://github.com/wxWidgets/wxWidgets/pull/1042

Closes #18275.
This commit is contained in:
Stefan Ziegler
2018-12-05 13:14:01 +01:00
committed by Vadim Zeitlin
parent 729295d02f
commit e1a702a205
3 changed files with 69 additions and 17 deletions

View File

@@ -142,6 +142,7 @@ All (GUI):
- Add wxGraphicsContext::GetWindow() and implement wxGraphicsContext::GetDPI().
- Add wxToolbook::EnablePage() (Stefan Ziegler).
- Adapt AUI colours to system colour changes (Daniel Kulp).
- Fix removing and inserting pages in wxToolbook (Stefan Ziegler).
wxGTK: