From 7d75e6c6cfaeb7c4e6ffb66f172232708015dc32 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 21 Apr 2005 19:53:51 +0000 Subject: [PATCH] some extra refreshing and updating on wxMac so the grid renders itself correctly. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33800 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/grid.cpp | 4 ++++ src/generic/gridsel.cpp | 12 ++++++++++++ 2 files changed, 16 insertions(+) diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 0f624d2e6d..e6ca7a0857 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -7788,6 +7788,10 @@ void wxGrid::HideCellEditControl() wxRect rect( CellToRect(row, col) ); CalcScrolledPosition(rect.x, rect.y, &rect.x, &rect.y ); rect.width = m_gridWin->GetClientSize().GetWidth() - rect.x; +#ifdef __WXMAC__ + // ensure that the pixels under the focus ring get refreshed as well + rect.Inflate(10,10); +#endif m_gridWin->Refresh( false, &rect ); } } diff --git a/src/generic/gridsel.cpp b/src/generic/gridsel.cpp index 317b5038e1..285247170d 100644 --- a/src/generic/gridsel.cpp +++ b/src/generic/gridsel.cpp @@ -807,6 +807,9 @@ void wxGridSelection::ClearSelection() { r = m_grid->BlockToDeviceRect( coords1, coords1 ); ((wxWindow *)m_grid->m_gridWin)->Refresh( false, &r ); +#ifdef __WXMAC__ + ((wxWindow *)m_grid->m_gridWin)->Update(); +#endif } } } @@ -823,6 +826,9 @@ void wxGridSelection::ClearSelection() { r = m_grid->BlockToDeviceRect( coords1, coords2 ); ((wxWindow *)m_grid->m_gridWin)->Refresh( false, &r ); +#ifdef __WXMAC__ + ((wxWindow *)m_grid->m_gridWin)->Update(); +#endif } } @@ -839,6 +845,9 @@ void wxGridSelection::ClearSelection() r = m_grid->BlockToDeviceRect( wxGridCellCoords( row, 0 ), wxGridCellCoords( row, m_grid->GetNumberCols() - 1 ) ); ((wxWindow *)m_grid->m_gridWin)->Refresh( false, &r ); +#ifdef __WXMAC__ + ((wxWindow *)m_grid->m_gridWin)->Update(); +#endif } } } @@ -856,6 +865,9 @@ void wxGridSelection::ClearSelection() r = m_grid->BlockToDeviceRect( wxGridCellCoords( 0, col ), wxGridCellCoords( m_grid->GetNumberRows() - 1, col ) ); ((wxWindow *)m_grid->m_gridWin)->Refresh( false, &r ); +#ifdef __WXMAC__ + ((wxWindow *)m_grid->m_gridWin)->Update(); +#endif } } } -- 2.45.2