Fix changing column order in wxGrid when some columns are hidden.
Using negative column widths used for hidden columns when updating the column positions after dragging one of them to a new position totally broke their display. Fix this by ignoring the hidden columns. Closes #16110. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76445 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -601,6 +601,7 @@ All (GUI):
|
||||
- Prevent wxGrid rows/columns from becoming too small on double click.
|
||||
- Fix wxGraphicsBitmap::ConvertToImage() when using Cairo.
|
||||
- Support loading ICO files with data in PNG format (Artur Wieczorek).
|
||||
- Fix dragging columns in wxGrid when some of them are hidden (Artur Wieczorek).
|
||||
|
||||
wxGTK:
|
||||
|
||||
|
@@ -4467,7 +4467,11 @@ void wxGrid::RefreshAfterColPosChange()
|
||||
{
|
||||
int colID = GetColAt( colPos );
|
||||
|
||||
colRight += m_colWidths[colID];
|
||||
// Ignore the currently hidden columns.
|
||||
const int width = m_colWidths[colID];
|
||||
if ( width > 0 )
|
||||
colRight += width;
|
||||
|
||||
m_colRights[colID] = colRight;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user