diff --git a/docs/changes.txt b/docs/changes.txt index 4faf217118..22a81ecfe4 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -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: diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index b19dc1782f..188c4b821e 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -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; } }