diff --git a/src/generic/treectlg.cpp b/src/generic/treectlg.cpp index 1dd90fef81..71d4246999 100644 --- a/src/generic/treectlg.cpp +++ b/src/generic/treectlg.cpp @@ -2231,14 +2231,9 @@ void wxGenericTreeCtrl::PaintItem(wxGenericTreeItem *item, wxDC& dc) if ( HasFlag(wxTR_FULL_ROW_HIGHLIGHT) ) { - int x, y, w, h; - // TODO : using DoGetPosition should be wrong on any platform, the dc is focused on this window -#ifdef __WXMAC__ - x=y=0; -#else - DoGetPosition(&x, &y); -#endif - DoGetSize(&w, &h); + int x, w, h; + x=0; + GetVirtualSize(&w, &h); dc.DrawRectangle(x, item->GetY()+offset, w, total_h-offset); } else