Net inspector: fix crash when switching boards on GTK

Can't invalidate columns while they are the sorting key
This commit is contained in:
Jon Evans 2024-03-20 23:04:28 -04:00
parent f00f47df13
commit a5ef4f1bef
1 changed files with 5 additions and 0 deletions

View File

@ -861,6 +861,11 @@ void PCB_NET_INSPECTOR_PANEL::onBoardChanged( wxCommandEvent& event )
m_board_loaded = true; m_board_loaded = true;
m_board_loading = true; m_board_loading = true;
wxDataViewColumn* currentSorting = m_netsList->GetSortingColumn();
if( currentSorting )
currentSorting->UnsetAsSortKey();
PROJECT_LOCAL_SETTINGS& localSettings = Pgm().GetSettingsManager().Prj().GetLocalSettings(); PROJECT_LOCAL_SETTINGS& localSettings = Pgm().GetSettingsManager().Prj().GetLocalSettings();
auto& cfg = localSettings.m_NetInspectorPanel; auto& cfg = localSettings.m_NetInspectorPanel;
m_searchCtrl->SetValue( cfg.filter_text ); m_searchCtrl->SetValue( cfg.filter_text );