From a5ef4f1bef56f2143e574499ae978ec2185d8bd5 Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Wed, 20 Mar 2024 23:04:28 -0400 Subject: [PATCH] Net inspector: fix crash when switching boards on GTK Can't invalidate columns while they are the sorting key --- pcbnew/widgets/pcb_net_inspector_panel.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pcbnew/widgets/pcb_net_inspector_panel.cpp b/pcbnew/widgets/pcb_net_inspector_panel.cpp index 205342da7d..5530caa90f 100644 --- a/pcbnew/widgets/pcb_net_inspector_panel.cpp +++ b/pcbnew/widgets/pcb_net_inspector_panel.cpp @@ -861,6 +861,11 @@ void PCB_NET_INSPECTOR_PANEL::onBoardChanged( wxCommandEvent& event ) m_board_loaded = true; m_board_loading = true; + wxDataViewColumn* currentSorting = m_netsList->GetSortingColumn(); + + if( currentSorting ) + currentSorting->UnsetAsSortKey(); + PROJECT_LOCAL_SETTINGS& localSettings = Pgm().GetSettingsManager().Prj().GetLocalSettings(); auto& cfg = localSettings.m_NetInspectorPanel; m_searchCtrl->SetValue( cfg.filter_text );