From 754aed4d7b9afc94e7db43b4bff97d3562013fd6 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 18 May 2022 17:45:44 +0200 Subject: [PATCH] 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. --- src/generic/treelist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generic/treelist.cpp b/src/generic/treelist.cpp index 42aff0385c..56f855ec1d 100644 --- a/src/generic/treelist.cpp +++ b/src/generic/treelist.cpp @@ -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,