Do a better job of looking for .probe commands in directives.

Fixes https://gitlab.com/kicad/code/kicad/issues/13941
This commit is contained in:
Jeff Young 2023-02-16 12:42:20 +00:00
parent d8a4f9821e
commit 95232edd0d
1 changed files with 9 additions and 3 deletions

View File

@ -792,10 +792,16 @@ void SIM_PLOT_FRAME::rebuildSignalsList()
// Add .PROBE directives
for( const wxString& directive : m_circuitModel->GetDirectives() )
{
wxString directiveParams;
wxStringTokenizer tokenizer( directive, wxT( "\r\n" ), wxTOKEN_STRTOK );
if( directive.Upper().StartsWith( wxS( ".PROBE" ), &directiveParams ) )
m_signals.push_back( directiveParams.Trim( false ) );
while( tokenizer.HasMoreTokens() )
{
wxString line = tokenizer.GetNextToken().Upper();
wxString directiveParams;
if( line.Upper().StartsWith( wxS( ".PROBE" ), &directiveParams ) )
m_signals.push_back( directiveParams.Trim( false ) );
}
}
std::sort( m_signals.begin(), m_signals.end(),