From e3dbeaaf31e04ad64f18a69bbcc543d7a249b5e5 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 19 Dec 2009 11:17:42 +0000 Subject: [PATCH] Correct selection/drop highlight rectangles width in generic wxDataViewCtrl. The third parameter of wxRect ctor is the width, not the right edge. See #11558. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62941 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/datavgen.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index 2cb09a49ca..cc597495d7 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -1656,7 +1656,8 @@ void wxDataViewMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) ) if (m_hasFocus) flags |= wxCONTROL_FOCUSED; - wxRect rect( x_start, GetLineStart( item ), x_last, GetLineHeight( item ) ); + wxRect rect( x_start, GetLineStart( item ), + x_last - x_start, GetLineHeight( item ) ); wxRendererNative::Get().DrawItemSelectionRect ( this, @@ -1671,7 +1672,7 @@ void wxDataViewMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) ) if (m_dropHint) { wxRect rect( x_start, GetLineStart( m_dropHintLine ), - x_last, GetLineHeight( m_dropHintLine ) ); + x_last - x_start, GetLineHeight( m_dropHintLine ) ); dc.SetPen( *wxBLACK_PEN ); dc.SetBrush( *wxTRANSPARENT_BRUSH ); dc.DrawRectangle( rect );