From: Robert Roebling Date: Fri, 12 Jun 2009 16:15:35 +0000 (+0000) Subject: Remove remaining bits of marker drawing during resizing X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/58e914f015bdffe96d3ed18e21b986f06332a47c Remove remaining bits of marker drawing during resizing git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61024 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/generic/headerctrlg.h b/include/wx/generic/headerctrlg.h index 944bd43815..8c9a842d3c 100644 --- a/include/wx/generic/headerctrlg.h +++ b/include/wx/generic/headerctrlg.h @@ -137,9 +137,6 @@ private: // given column plus its minimal width and return the effective width int ConstrainByMinWidth(unsigned int col, int& xPhysical); - // update the current position of the resizing marker - void UpdateResizingMarker(int xPhysical); - // update the information displayed while a column is being moved around void UpdateReorderingMarker(int xPhysical); diff --git a/src/generic/headerctrlg.cpp b/src/generic/headerctrlg.cpp index 4c70667487..ac50c2e173 100644 --- a/src/generic/headerctrlg.cpp +++ b/src/generic/headerctrlg.cpp @@ -258,26 +258,14 @@ void wxHeaderCtrl::ClearMarkers() dcover.Clear(); } -void wxHeaderCtrl::UpdateResizingMarker(int xPhysical) -{ - wxClientDC dc(this); - - wxDCOverlay dcover(m_overlay, &dc); - dcover.Clear(); - - // unfortunately drawing the marker over the parent window doesn't work as - // it's usually covered by another window (the main control view) so just - // draw the marker over the header itself, even if it makes it not very - // useful - dc.SetPen(*wxLIGHT_GREY_PEN); - dc.DrawLine(xPhysical, 0, xPhysical, GetClientSize().y); -} - void wxHeaderCtrl::EndDragging() { - ClearMarkers(); - - m_overlay.Reset(); + // We currently only use markers for reordering, not for resizing + if (IsReordering()) + { + ClearMarkers(); + m_overlay.Reset(); + } // don't use the special dragging cursor any more SetCursor(wxNullCursor); @@ -344,8 +332,6 @@ void wxHeaderCtrl::StartOrContinueResizing(unsigned int col, int xPhysical) } //else: we had already done the above when we started - // This results in ugly flicker - // UpdateResizingMarker(xPhysical); } }