From eb0d3d653ff597a3ccded87e4cd48d58ee0f8eec Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Sun, 23 Aug 2020 13:48:50 -0400 Subject: [PATCH] Fix updating of grid view in MSW --- pcbnew/widgets/appearance_controls.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pcbnew/widgets/appearance_controls.cpp b/pcbnew/widgets/appearance_controls.cpp index 852dc60004..ec49fca58a 100644 --- a/pcbnew/widgets/appearance_controls.cpp +++ b/pcbnew/widgets/appearance_controls.cpp @@ -557,7 +557,11 @@ void APPEARANCE_CONTROLS::OnNetGridClick( wxGridEvent& event ) { case NET_GRID_TABLE::COL_VISIBILITY: m_netsTable->SetValueAsBool( row, col, !m_netsTable->GetValueAsBool( row, col ) ); +#ifdef __WXMSW__ + m_netsGrid->ForceRefresh(); +#else m_netsGrid->RefreshRect( m_netsGrid->CellToRect( row, col ) ); +#endif break; default: @@ -2087,8 +2091,12 @@ void APPEARANCE_CONTROLS::showNetclass( const wxString& aClassName, bool aShow ) if( row >= 0 ) { m_netsTable->SetValueAsBool( row, NET_GRID_TABLE::COL_VISIBILITY, aShow ); +#ifdef __WXMSW__ + m_netsGrid->ForceRefresh(); +#else m_netsGrid->RefreshRect( m_netsGrid->CellToRect( row, NET_GRID_TABLE::COL_VISIBILITY ) ); +#endif } } } @@ -2109,8 +2117,12 @@ void APPEARANCE_CONTROLS::showNetclass( const wxString& aClassName, bool aShow ) if( row >= 0 ) { m_netsTable->SetValueAsBool( row, NET_GRID_TABLE::COL_VISIBILITY, aShow ); +#ifdef __WXMSW__ + m_netsGrid->ForceRefresh(); +#else m_netsGrid->RefreshRect( m_netsGrid->CellToRect( row, NET_GRID_TABLE::COL_VISIBILITY ) ); +#endif } } }