From 3b6fb700734d578adedb48429b5648ad64f75343 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Va=CC=81clav=20Slavi=CC=81k?= Date: Thu, 1 Feb 2024 11:40:05 +0100 Subject: [PATCH] Simplify icon column creation --- src/edlistctrl.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/edlistctrl.cpp b/src/edlistctrl.cpp index d7176f2033..15cf055755 100644 --- a/src/edlistctrl.cpp +++ b/src/edlistctrl.cpp @@ -656,9 +656,7 @@ void PoeditListCtrl::CreateColumns() int iconWidth = PX(16); #endif - auto iconRenderer = new wxDataViewBitmapRenderer("wxIcon", wxDATAVIEW_CELL_INERT, wxALIGN_CENTER | wxALIGN_CENTRE_VERTICAL); - m_colIcon = new wxDataViewColumn(L"∙", iconRenderer, Model::Col_Icon, iconWidth, wxALIGN_CENTER, 0); - AppendColumn(m_colIcon); + m_colIcon = AppendBitmapColumn(L"∙", Model::Col_Icon, wxDATAVIEW_CELL_INERT, iconWidth, wxALIGN_CENTER, 0); auto sourceRenderer = new DataViewMarkupRenderer(); sourceRenderer->EnableEllipsize(wxELLIPSIZE_END);