Fix resizing of wxGrid columns when they were reordered.
The column resizing code in wxGrid didn't take account of the fact that the column positions and indices could be different. Correct it by inserting calls to wxGrid::GetColAt() and GetColPos() in a new wxGridOperations::GetLineBefore() method. Closes #11984. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66137 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -6281,7 +6281,9 @@ int wxGrid::PosToEdgeOfLine(int pos, const wxGridOperations& oper) const
|
||||
else if ( line > 0 &&
|
||||
pos - oper.GetLineStartPos(this,
|
||||
line) < WXGRID_LABEL_EDGE_ZONE )
|
||||
return line - 1;
|
||||
{
|
||||
return oper.GetLineBefore(this, line);
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
|
Reference in New Issue
Block a user