Fix wxBitmapBundle support in wxTreeList

Don't use wxWithImages::GetImage(), which is limited to only a single
bitmap resolution, but use GetBitmapBundle() instead to ensure that we
show the representation of the bitmap appropriate for the current
resolution.
This commit is contained in:
Vadim Zeitlin 2022-05-18 17:45:44 +02:00
parent ed264087ec
commit 754aed4d7b

View File

@ -672,7 +672,7 @@ wxTreeListModel::GetValue(wxVariant& variant,
if ( image == wxWithImages::NO_IMAGE )
image = node->m_imageClosed;
wxIcon icon = m_treelist->GetImage(image);
wxBitmapBundle icon = m_treelist->GetBitmapBundle(image);
if ( m_treelist->HasFlag(wxTL_CHECKBOX) )
variant << wxDataViewCheckIconText(node->m_text, icon,