Remove manual mirroring in RTL case from wxGrid code.

This is not necessary as wxDC already inherits RTL from the window itself and,
in fact, breaks the display when using RTL.

Closes #16250.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77038 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-08-09 18:03:15 +00:00
parent 0094b93dc6
commit c1a2d55dc5

View File

@@ -1668,10 +1668,7 @@ void wxGridColLabelWindow::OnPaint( wxPaintEvent& WXUNUSED(event) )
int x, y;
m_owner->CalcUnscrolledPosition( 0, 0, &x, &y );
wxPoint pt = dc.GetDeviceOrigin();
if (GetLayoutDirection() == wxLayout_RightToLeft)
dc.SetDeviceOrigin( pt.x+x, pt.y );
else
dc.SetDeviceOrigin( pt.x-x, pt.y );
dc.SetDeviceOrigin( pt.x-x, pt.y );
wxArrayInt cols = m_owner->CalcColLabelsExposed( GetUpdateRegion() );
m_owner->DrawColLabels( dc, cols );
@@ -3724,13 +3721,9 @@ void wxGrid::ProcessColLabelMouseEvent( wxMouseEvent& event )
// and check if we're on the "near" (usually left but right
// in RTL case) part of the column
bool onNearPart;
const int middle = GetColLeft(colValid) +
GetColWidth(colValid)/2;
if ( GetLayoutDirection() == wxLayout_LeftToRight )
onNearPart = (x <= middle);
else // wxLayout_RightToLeft
onNearPart = (x > middle);
const bool onNearPart = (x <= middle);
// adjust for the column being dragged itself
if ( pos < GetColPos(m_dragRowOrCol) )