sim - don't create measurement duplicates

This commit is contained in:
Fabien Corona 2023-02-22 18:49:06 +01:00
parent aa006e9b91
commit 1170fb2e18
1 changed files with 7 additions and 0 deletions

View File

@ -1465,6 +1465,13 @@ void SIM_PLOT_FRAME::RemoveTuner( TUNER_SLIDER* aTuner, bool aErase )
void SIM_PLOT_FRAME::AddMeasurement( const wxString& aCmd )
{
// -1 because the last one is for user inpu
for ( int i = 0; i < m_measurementsGrid->GetNumberRows(); i++ )
{
if ( m_measurementsGrid->GetCellValue( i, COL_MEASUREMENT ) == aCmd )
return; // Don't create duplicates
}
SIM_PLOT_PANEL* plotPanel = GetCurrentPlot();
if( !plotPanel )