eeschema, sim: clean signal list when last panel is closed

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/9119
This commit is contained in:
Sylwester Kocjan 2021-09-08 22:56:33 +02:00 committed by Jon Evans
parent 1c9e10f34e
commit fe608bfcef
1 changed files with 11 additions and 7 deletions

View File

@ -1350,18 +1350,22 @@ void SIM_PLOT_FRAME::menuTuneUpdate( wxUpdateUIEvent& event )
void SIM_PLOT_FRAME::onPlotClose( wxAuiNotebookEvent& event )
{
int idx = event.GetSelection();
if( idx == wxNOT_FOUND )
return;
wxCommandEvent dummy;
onCursorUpdate( dummy );
}
void SIM_PLOT_FRAME::onPlotClosed( wxAuiNotebookEvent& event )
{
if( m_workbook->GetPageCount() == 0 )
{
m_signals->ClearAll();
m_cursors->ClearAll();
}
else
{
updateSignalList();
wxCommandEvent dummy;
onCursorUpdate( dummy );
}
}