Fix usage of wxWithImages::Images in wxTreebook
This commit is contained in:
committed by
Vadim Zeitlin
parent
c3b232dcfd
commit
ca1eefdba2
@@ -564,16 +564,15 @@ wxWindow *wxTreebook::TryGetNonNullPage(size_t n)
|
||||
return page;
|
||||
}
|
||||
|
||||
void wxTreebook::SetImageList(wxImageList *imageList)
|
||||
void wxTreebook::OnImagesChanged()
|
||||
{
|
||||
wxBookCtrlBase::SetImageList(imageList);
|
||||
GetTreeCtrl()->SetImageList(imageList);
|
||||
}
|
||||
|
||||
void wxTreebook::AssignImageList(wxImageList *imageList)
|
||||
{
|
||||
wxBookCtrlBase::AssignImageList(imageList);
|
||||
GetTreeCtrl()->SetImageList(imageList);
|
||||
// Propagate the images to the tree control which will actually use them.
|
||||
wxTreeCtrl* const tree = GetTreeCtrl();
|
||||
const Images& images = GetImages();
|
||||
if ( !images.empty() )
|
||||
tree->SetImages(images);
|
||||
else
|
||||
tree->SetImageList(GetImageList());
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user