From: Vadim Zeitlin Date: Wed, 26 Oct 2022 23:48:39 +0000 (+0200) Subject: [PATCH] Fix drawing of icons for non-root wxTreeCtrl items X-Git-Tag: archive/raspbian/3.2.11+dfsg1-1+rpi1~1^2^2^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=b2fd736cd43094cb89e0f7e88fb98862a2cc3b25;p=wxwidgets3.2.git [PATCH] Fix drawing of icons for non-root wxTreeCtrl items Fix y coordinate value passed to wxDC::DrawBitmap() by restoring the parentheses accidentally removed in 6dd4e73ea3 (Add wxDrawImageBitmap() helper and use it in wx{List,Tree}Ctrl, 2022-10-25). (cherry picked from commit 2a13fd238ea499a3e4b089f3ca3a327e94ddb4d9) See #23255. Gbp-Pq: Name fix-drawing-icons-wxtreectrl.patch --- diff --git a/src/generic/treectlg.cpp b/src/generic/treectlg.cpp index ae35a7d..f2a97ca 100644 --- a/src/generic/treectlg.cpp +++ b/src/generic/treectlg.cpp @@ -2708,7 +2708,7 @@ void wxGenericTreeCtrl::PaintItem(wxGenericTreeItem *item, wxDC& dc) dc, item->GetX(), item->GetY() + - total_h > state_h ? (total_h-state_h)/2 : 0); + (total_h > state_h ? (total_h-state_h)/2 : 0)); } if ( image != NO_IMAGE ) @@ -2719,7 +2719,7 @@ void wxGenericTreeCtrl::PaintItem(wxGenericTreeItem *item, wxDC& dc) dc, item->GetX() + state_w, item->GetY() + - total_h > image_h ? (total_h-image_h)/2 : 0); + (total_h > image_h ? (total_h-image_h)/2 : 0)); } dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT);