Add wxWithImages::GetImageCount() and HasImages() helpers
These functions allow avoiding using wxImageList explicitly in a couple of places. No real changes, this just prepares for adding new API not based on wxImageList.
This commit is contained in:
@@ -157,9 +157,9 @@ wxPanel *CreateInsertPage(wxBookCtrlBase *parent)
|
||||
|
||||
int GetIconIndex(wxBookCtrlBase* bookCtrl)
|
||||
{
|
||||
if (bookCtrl && bookCtrl->GetImageList())
|
||||
if (bookCtrl)
|
||||
{
|
||||
int nImages = bookCtrl->GetImageList()->GetImageCount();
|
||||
const int nImages = bookCtrl->GetImageCount();
|
||||
if (nImages > 0)
|
||||
{
|
||||
return bookCtrl->GetPageCount() % nImages;
|
||||
|
||||
Reference in New Issue
Block a user