mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2528 Tensor Vectors: Make tensor vectors for result "E"
This commit is contained in:
@@ -226,7 +226,7 @@ void RimTensorResults::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
|
||||
std::vector<std::string> fieldCompNames = getResultMetaDataForUIFieldSetting();
|
||||
if (m_resultPositionTypeUiField() == m_resultPositionType())
|
||||
{
|
||||
m_resultFieldNameUiField = m_resultFieldName();
|
||||
m_resultFieldNameUiField = uiFieldName(m_resultFieldName());
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -237,7 +237,7 @@ void RimTensorResults::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
|
||||
if (changedField == &m_resultFieldNameUiField)
|
||||
{
|
||||
m_resultPositionType = m_resultPositionTypeUiField;
|
||||
m_resultFieldName = m_resultFieldNameUiField;
|
||||
m_resultFieldName = fieldNameFromUi(m_resultFieldNameUiField);
|
||||
}
|
||||
if (changedField == &m_showTensors)
|
||||
{
|
||||
@@ -319,7 +319,7 @@ void RimTensorResults::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering
|
||||
void RimTensorResults::initAfterRead()
|
||||
{
|
||||
m_resultPositionTypeUiField = m_resultPositionType;
|
||||
m_resultFieldNameUiField = m_resultFieldName();
|
||||
m_resultFieldNameUiField = uiFieldName(m_resultFieldName());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -336,3 +336,29 @@ void RimTensorResults::defineEditorAttribute(const caf::PdmFieldHandle* field, Q
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimTensorResults::uiFieldName(const QString& fieldName)
|
||||
{
|
||||
if (fieldName == "NE")
|
||||
{
|
||||
return QString("E");
|
||||
}
|
||||
|
||||
return fieldName;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimTensorResults::fieldNameFromUi(const QString& uiFieldName)
|
||||
{
|
||||
if (uiFieldName == "E")
|
||||
{
|
||||
return QString("NE");
|
||||
}
|
||||
|
||||
return uiFieldName;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user