mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#464) Set logarithmic scale if PERM is selected as single curve
This commit is contained in:
parent
b80639436c
commit
c67a413926
@ -276,6 +276,8 @@ void RimWellLogExtractionCurve::updatePlotData()
|
||||
|
||||
zoomAllOwnerTrackAndPlot();
|
||||
|
||||
setLogScaleFromSelectedResult();
|
||||
|
||||
if (m_ownerQwtTrack) m_ownerQwtTrack->replot();
|
||||
}
|
||||
}
|
||||
@ -418,6 +420,26 @@ void RimWellLogExtractionCurve::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiT
|
||||
uiTreeOrdering.setForgetRemainingFields(true);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogExtractionCurve::setLogScaleFromSelectedResult()
|
||||
{
|
||||
QString resVar = m_eclipseResultDefinition->resultVariable();
|
||||
|
||||
if (resVar.toUpper().contains("PERM"))
|
||||
{
|
||||
RimWellLogTrack* track = NULL;
|
||||
this->firstAnchestorOrThisOfType(track);
|
||||
if (track)
|
||||
{
|
||||
if (track->curveCount() == 1)
|
||||
{
|
||||
track->setLogarithmicScale(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
|
@ -27,8 +27,8 @@
|
||||
class RimCase;
|
||||
class RimEclipseResultDefinition;
|
||||
class RimGeoMechResultDefinition;
|
||||
class RimWellPath;
|
||||
class RimView;
|
||||
class RimWellPath;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
@ -62,6 +62,10 @@ protected:
|
||||
|
||||
virtual void defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "");
|
||||
|
||||
private:
|
||||
void setLogScaleFromSelectedResult();
|
||||
|
||||
private:
|
||||
caf::PdmPtrField<RimWellPath*> m_wellPath;
|
||||
caf::PdmPtrField<RimCase*> m_case;
|
||||
caf::PdmChildField<RimEclipseResultDefinition*> m_eclipseResultDefinition;
|
||||
@ -75,4 +79,3 @@ protected:
|
||||
caf::PdmField<bool> m_addDateToCurveName;
|
||||
};
|
||||
|
||||
|
||||
|
@ -436,3 +436,14 @@ void RimWellLogTrack::computeAndSetXRangeMinForLogarithmicScale()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogTrack::setLogarithmicScale(bool enable)
|
||||
{
|
||||
m_isLogarithmicScaleEnabled = enable;
|
||||
|
||||
updateAxisScaleEngine();
|
||||
computeAndSetXRangeMinForLogarithmicScale();
|
||||
}
|
||||
|
@ -64,6 +64,8 @@ public:
|
||||
|
||||
RimWellLogCurve* curveDefinitionFromCurve(const QwtPlotCurve* curve) const;
|
||||
|
||||
void setLogarithmicScale(bool enable);
|
||||
|
||||
protected:
|
||||
// Overridden PDM methods
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue);
|
||||
|
Loading…
Reference in New Issue
Block a user