mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Avoid setting signal multiple times
This commit is contained in:
@@ -153,17 +153,14 @@ void RimEclipseCellColors::changeLegendConfig( QString resultVarNameOfNewLegend
|
|||||||
this->m_useDiscreteLogLevels,
|
this->m_useDiscreteLogLevels,
|
||||||
this->hasCategoryResult() );
|
this->hasCategoryResult() );
|
||||||
|
|
||||||
|
newLegend->changed.connect( this, &RimEclipseCellColors::onLegendConfigChanged );
|
||||||
|
|
||||||
m_legendConfigData.push_back( newLegend );
|
m_legendConfigData.push_back( newLegend );
|
||||||
|
|
||||||
this->m_legendConfigPtrField = 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
|
// set to nullptr before pushing into container
|
||||||
obsoleteField_legendConfig = nullptr;
|
obsoleteField_legendConfig = nullptr;
|
||||||
|
|
||||||
|
obsoleteLegend->changed.connect( this, &RimEclipseCellColors::onLegendConfigChanged );
|
||||||
m_legendConfigData.push_back( obsoleteLegend );
|
m_legendConfigData.push_back( obsoleteLegend );
|
||||||
|
|
||||||
m_legendConfigPtrField = obsoleteLegend;
|
m_legendConfigPtrField = obsoleteLegend;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user