From 1fbb7f17c70f79d59f54f0012ed77463b08cbffd Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Tue, 26 Oct 2021 15:54:31 +0100 Subject: [PATCH] Don't copy (or cut) hidden columns. Fixes https://gitlab.com/kicad/code/kicad/issues/1911 --- common/grid_tricks.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/grid_tricks.cpp b/common/grid_tricks.cpp index cf01e0e14c..f1aa8b1dfa 100644 --- a/common/grid_tricks.cpp +++ b/common/grid_tricks.cpp @@ -661,6 +661,9 @@ void GRID_TRICKS::cutcopy( bool doCopy, bool doDelete ) { for( int col = m_sel_col_start; col < m_sel_col_start + m_sel_col_count; ++col ) { + if( !m_grid->IsColShown( col ) ) + continue; + txt += tbl->GetValue( row, col ); if( col < m_sel_col_start + m_sel_col_count - 1 ) // that was not last column