mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4200 Grid Cross Plot : Improve text for annotation items
This commit is contained in:
@@ -94,17 +94,6 @@ void RimPlotAxisAnnotation::setEquilibriumData(RimEclipseCase* eclipseCas
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
QString RimPlotAxisAnnotation::name() const
|
QString RimPlotAxisAnnotation::name() const
|
||||||
{
|
{
|
||||||
if (m_annotationType() == PL_EQUIL_WATER_OIL_CONTACT)
|
|
||||||
{
|
|
||||||
QString text = QString("WOC %1").arg(value());
|
|
||||||
return text;
|
|
||||||
}
|
|
||||||
else if (m_annotationType() == PL_EQUIL_GAS_OIL_CONTACT)
|
|
||||||
{
|
|
||||||
QString text = QString("GOC %1").arg(value());
|
|
||||||
return text;
|
|
||||||
}
|
|
||||||
|
|
||||||
return m_name();
|
return m_name();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -236,7 +225,16 @@ void RimPlotAxisAnnotation::updateName()
|
|||||||
{
|
{
|
||||||
QString text;
|
QString text;
|
||||||
|
|
||||||
if (m_annotationType() == PL_EQUIL_WATER_OIL_CONTACT)
|
if (m_annotationType() == PL_EQUIL_WATER_OIL_CONTACT || m_annotationType() == PL_EQUIL_GAS_OIL_CONTACT)
|
||||||
|
{
|
||||||
|
double diffBetweenTwoContactDepths =
|
||||||
|
std::fabs(selectedItem().gasOilContactDepth() - selectedItem().waterOilContactDepth());
|
||||||
|
|
||||||
|
if (diffBetweenTwoContactDepths < 0.1)
|
||||||
|
{
|
||||||
|
text = QString("GWC %1").arg(selectedItem().gasOilContactDepth());
|
||||||
|
}
|
||||||
|
else if (m_annotationType() == PL_EQUIL_WATER_OIL_CONTACT)
|
||||||
{
|
{
|
||||||
text = QString("WOC %1").arg(value());
|
text = QString("WOC %1").arg(value());
|
||||||
}
|
}
|
||||||
@@ -247,3 +245,4 @@ void RimPlotAxisAnnotation::updateName()
|
|||||||
|
|
||||||
m_name = text;
|
m_name = text;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user