From 4e467d818b2eb3df74ff0b6087053e02211a10fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kinaou=20Herv=C3=A9?= Date: Wed, 10 May 2017 17:49:49 +0200 Subject: [PATCH] Fix retrieving page image index in wxListbook wxListbook::GetPageImage() always returned -1. Fix this by defining the mask properly before calling wxListCtrl::GetItem(). Closes #17858. --- src/generic/listbkg.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/generic/listbkg.cpp b/src/generic/listbkg.cpp index 013196dbaf..a7f9229d5e 100644 --- a/src/generic/listbkg.cpp +++ b/src/generic/listbkg.cpp @@ -237,6 +237,7 @@ int wxListbook::GetPageImage(size_t n) const { wxListItem item; item.SetId(n); + item.SetMask(wxLIST_MASK_IMAGE); if (GetListView()->GetItem(item)) {