diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 1fed94b434..b324ac86c5 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -4455,7 +4455,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; } }