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:
committed by
Vadim Zeitlin
parent
d37a15444f
commit
cf3709147a
@@ -1068,6 +1068,7 @@ public:
|
|||||||
void DrawAllGridLines( wxDC& dc, const wxRegion & reg );
|
void DrawAllGridLines( wxDC& dc, const wxRegion & reg );
|
||||||
void DrawCell( wxDC& dc, const wxGridCellCoords& );
|
void DrawCell( wxDC& dc, const wxGridCellCoords& );
|
||||||
void DrawHighlight(wxDC& dc, const wxGridCellCoordsArray& cells);
|
void DrawHighlight(wxDC& dc, const wxGridCellCoordsArray& cells);
|
||||||
|
void UpdateGridWindows() const;
|
||||||
|
|
||||||
// this function is called when the current cell highlight must be redrawn
|
// this function is called when the current cell highlight must be redrawn
|
||||||
// and may be overridden by the user
|
// and may be overridden by the user
|
||||||
|
@@ -4629,6 +4629,10 @@ void wxGrid::EnableDragColMove( bool enable )
|
|||||||
// order, whereas now you can always call ResetColPos() manually if needed
|
// order, whereas now you can always call ResetColPos() manually if needed
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxGrid::UpdateGridWindows() const
|
||||||
|
{
|
||||||
|
m_gridWin->Update();
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// ------ interaction with data model
|
// ------ interaction with data model
|
||||||
|
@@ -915,7 +915,7 @@ void wxGridSelection::ClearSelection()
|
|||||||
((wxWindow *)m_grid->m_gridWin)->Refresh( false, &r );
|
((wxWindow *)m_grid->m_gridWin)->Refresh( false, &r );
|
||||||
|
|
||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
((wxWindow *)m_grid->m_gridWin)->Update();
|
m_grid->UpdateGridWindows();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -935,7 +935,7 @@ void wxGridSelection::ClearSelection()
|
|||||||
((wxWindow *)m_grid->m_gridWin)->Refresh( false, &r );
|
((wxWindow *)m_grid->m_gridWin)->Refresh( false, &r );
|
||||||
|
|
||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
((wxWindow *)m_grid->m_gridWin)->Update();
|
m_grid->UpdateGridWindows();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -955,7 +955,7 @@ void wxGridSelection::ClearSelection()
|
|||||||
((wxWindow *)m_grid->m_gridWin)->Refresh( false, &r );
|
((wxWindow *)m_grid->m_gridWin)->Refresh( false, &r );
|
||||||
|
|
||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
((wxWindow *)m_grid->m_gridWin)->Update();
|
m_grid->UpdateGridWindows();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -976,7 +976,7 @@ void wxGridSelection::ClearSelection()
|
|||||||
((wxWindow *)m_grid->m_gridWin)->Refresh( false, &r );
|
((wxWindow *)m_grid->m_gridWin)->Refresh( false, &r );
|
||||||
|
|
||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
((wxWindow *)m_grid->m_gridWin)->Update();
|
m_grid->UpdateGridWindows();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user