Slightly simplify wxGrid refresh logic
Use new ShouldRefresh() helper instead of testing for !GetBatchCount() before calling Refresh(). Also check for GetBatchCount() inside CalcDimensions() itself, which means that it can now be called unconditionally. No real changes.
This commit is contained in:
@@ -2454,6 +2454,12 @@ private:
|
||||
// release the mouse capture if it's currently captured
|
||||
void EndDraggingIfNecessary();
|
||||
|
||||
// return true if the grid should be refreshed right now
|
||||
bool ShouldRefresh() const
|
||||
{
|
||||
return !GetBatchCount() && IsShownOnScreen();
|
||||
}
|
||||
|
||||
|
||||
// return the position (not index) of the column at the given logical pixel
|
||||
// position
|
||||
|
Reference in New Issue
Block a user