mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-07 14:43:10 -06:00
Avoid setting signal multiple times
This commit is contained in:
parent
5706c433d0
commit
5c0082f20b
@ -153,17 +153,14 @@ void RimEclipseCellColors::changeLegendConfig( QString resultVarNameOfNewLegend
|
||||
this->m_useDiscreteLogLevels,
|
||||
this->hasCategoryResult() );
|
||||
|
||||
newLegend->changed.connect( this, &RimEclipseCellColors::onLegendConfigChanged );
|
||||
|
||||
m_legendConfigData.push_back( newLegend );
|
||||
|
||||
this->m_legendConfigPtrField = newLegend;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for ( auto legendConfig : m_legendConfigData )
|
||||
{
|
||||
legendConfig->changed.connect( this, &RimEclipseCellColors::onLegendConfigChanged );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -209,7 +206,9 @@ void RimEclipseCellColors::initAfterRead()
|
||||
// set to nullptr before pushing into container
|
||||
obsoleteField_legendConfig = nullptr;
|
||||
|
||||
obsoleteLegend->changed.connect( this, &RimEclipseCellColors::onLegendConfigChanged );
|
||||
m_legendConfigData.push_back( obsoleteLegend );
|
||||
|
||||
m_legendConfigPtrField = obsoleteLegend;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user