mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-14 17:44:20 -06:00
#5979 Fix color legend crash when opening regression test project
Projects containing Rim2dIntersectionViews copy legend config from the view using PdmXmlObjectHandle::writeObjectToXmlString/readObjectFromXmlString. The resulting xml contains references to RimColorLegendCollection which are unresolved, and this would lead to a crash (m_colorLegend == nullptr). Fixed by resolving the references explicitly after copy the config.
This commit is contained in:
parent
d6be12bf02
commit
3e882a65df
@ -884,6 +884,7 @@ void RimRegularLegendConfig::setUiValuesFromLegendConfig( const RimRegularLegend
|
||||
{
|
||||
QString serializedObjectString = otherLegendConfig->writeObjectToXmlString();
|
||||
this->readObjectFromXmlString( serializedObjectString, caf::PdmDefaultObjectFactory::instance() );
|
||||
this->resolveReferencesRecursively();
|
||||
this->updateLegend();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user