Use wxGrid::UpdateGridWindows() helper in wxGridSelection code

This function advantageously replaces the ugly casts that were used in
wxGridSelection code before.
This commit is contained in:
lucian-rotariu
2019-07-11 01:02:14 +02:00
committed by Vadim Zeitlin
parent d37a15444f
commit cf3709147a
3 changed files with 9 additions and 4 deletions

View File

@@ -1068,6 +1068,7 @@ public:
void DrawAllGridLines( wxDC& dc, const wxRegion & reg );
void DrawCell( wxDC& dc, const wxGridCellCoords& );
void DrawHighlight(wxDC& dc, const wxGridCellCoordsArray& cells);
void UpdateGridWindows() const;
// this function is called when the current cell highlight must be redrawn
// and may be overridden by the user

View File

@@ -4629,6 +4629,10 @@ void wxGrid::EnableDragColMove( bool enable )
// order, whereas now you can always call ResetColPos() manually if needed
}
void wxGrid::UpdateGridWindows() const
{
m_gridWin->Update();
}
//
// ------ interaction with data model

View File

@@ -915,7 +915,7 @@ void wxGridSelection::ClearSelection()
((wxWindow *)m_grid->m_gridWin)->Refresh( false, &r );
#ifdef __WXMAC__
((wxWindow *)m_grid->m_gridWin)->Update();
m_grid->UpdateGridWindows();
#endif
}
}
@@ -935,7 +935,7 @@ void wxGridSelection::ClearSelection()
((wxWindow *)m_grid->m_gridWin)->Refresh( false, &r );
#ifdef __WXMAC__
((wxWindow *)m_grid->m_gridWin)->Update();
m_grid->UpdateGridWindows();
#endif
}
}
@@ -955,7 +955,7 @@ void wxGridSelection::ClearSelection()
((wxWindow *)m_grid->m_gridWin)->Refresh( false, &r );
#ifdef __WXMAC__
((wxWindow *)m_grid->m_gridWin)->Update();
m_grid->UpdateGridWindows();
#endif
}
}
@@ -976,7 +976,7 @@ void wxGridSelection::ClearSelection()
((wxWindow *)m_grid->m_gridWin)->Refresh( false, &r );
#ifdef __WXMAC__
((wxWindow *)m_grid->m_gridWin)->Update();
m_grid->UpdateGridWindows();
#endif
}
}