#559 : Linked views : Use writeObjectToXmlString to copy field values

This commit is contained in:
Magne Sjaastad 2016-12-09 21:16:43 +01:00
parent f04c56df01
commit 7562e7bb30
2 changed files with 4 additions and 22 deletions

View File

@ -776,17 +776,8 @@ cvf::OverlayItem* RimLegendConfig::legend()
//--------------------------------------------------------------------------------------------------
void RimLegendConfig::setUiValuesFromLegendConfig(const RimLegendConfig* otherLegendConfig)
{
this->m_numLevels = otherLegendConfig->m_numLevels;
this->m_precision = otherLegendConfig->m_precision;
this->m_tickNumberFormat = otherLegendConfig->m_tickNumberFormat;
this->m_rangeMode = otherLegendConfig->m_rangeMode;
this->m_userDefinedMaxValue = otherLegendConfig->m_userDefinedMaxValue;
this->m_userDefinedMinValue = otherLegendConfig->m_userDefinedMinValue;
this->m_colorRangeMode = otherLegendConfig->m_colorRangeMode;
this->m_mappingMode = otherLegendConfig->m_mappingMode;
this->m_userDefinedMinValue = otherLegendConfig->m_userDefinedMinValue;
this->m_userDefinedMaxValue = otherLegendConfig->m_userDefinedMaxValue;
QString serializedObjectString = otherLegendConfig->writeObjectToXmlString();
this->readObjectFromXmlString(serializedObjectString, caf::PdmDefaultObjectFactory::instance());
}
//--------------------------------------------------------------------------------------------------

View File

@ -250,17 +250,8 @@ void RimTernaryLegendConfig::recreateLegend()
//--------------------------------------------------------------------------------------------------
void RimTernaryLegendConfig::setUiValuesFromLegendConfig(const RimTernaryLegendConfig* otherLegendConfig)
{
this->precision = otherLegendConfig->precision;
this->rangeMode = otherLegendConfig->rangeMode;
this->userDefinedMaxValueSoil = otherLegendConfig->userDefinedMaxValueSoil;
this->userDefinedMinValueSoil = otherLegendConfig->userDefinedMinValueSoil;
this->userDefinedMaxValueSgas = otherLegendConfig->userDefinedMaxValueSgas;
this->userDefinedMinValueSgas = otherLegendConfig->userDefinedMinValueSgas;
this->userDefinedMaxValueSwat = otherLegendConfig->userDefinedMaxValueSwat;
this->userDefinedMinValueSwat = otherLegendConfig->userDefinedMinValueSwat;
this->applyLocalMinMax = otherLegendConfig->applyLocalMinMax;
this->applyGlobalMinMax = otherLegendConfig->applyGlobalMinMax;
this->applyFullRangeMinMax = otherLegendConfig->applyFullRangeMinMax;
QString serializedObjectString = otherLegendConfig->writeObjectToXmlString();
this->readObjectFromXmlString(serializedObjectString, caf::PdmDefaultObjectFactory::instance());
}
//--------------------------------------------------------------------------------------------------