Refactor wxGrid code to use SetNativeHeaderColXXX() functions

Add two simple helpers: SetNativeHeaderColCount() and
SetNativeHeaderColOrder() and call the latter from the former to ensure
that the columns order is always correct when switching to the native
control.
This commit is contained in:
Vadim Zeitlin
2019-07-15 15:13:42 +02:00
parent 3baeb6e834
commit a871229f8b
2 changed files with 29 additions and 6 deletions

View File

@@ -2382,6 +2382,12 @@ private:
void DoSetRowSize( int row, int height );
void DoSetColSize( int col, int width );
// These methods can only be called when m_useNativeHeader is true and call
// SetColumnCount() and Set- or ResetColumnsOrder() as necessary on the
// native wxHeaderCtrl being used. Note that the first one already calls
// the second one, so it's never necessary to call both of them.
void SetNativeHeaderColCount();
void SetNativeHeaderColOrder();
// these sets contain the indices of fixed, i.e. non-resizable
// interactively, grid rows or columns and are NULL if there are no fixed