mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4206 Set new defaults for grid cross plot
This commit is contained in:
parent
f09f487635
commit
155dba5591
@ -606,6 +606,14 @@ bool RimGridCrossPlot::isYAxisLogarithmic() const
|
||||
return m_yAxisProperties->isLogarithmicScaleEnabled();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimGridCrossPlot::setYAxisInverted(bool inverted)
|
||||
{
|
||||
m_yAxisProperties->setAxisInverted(inverted);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -76,7 +76,7 @@ public:
|
||||
RiuGridCrossQwtPlot* qwtPlot() const;
|
||||
bool isXAxisLogarithmic() const;
|
||||
bool isYAxisLogarithmic() const;
|
||||
|
||||
void setYAxisInverted(bool inverted);
|
||||
public:
|
||||
// Rim2dPlotInterface overrides
|
||||
void updateAxisScaling() override;
|
||||
|
@ -122,7 +122,29 @@ RimGridCrossPlotCurveSet::RimGridCrossPlotCurveSet()
|
||||
void RimGridCrossPlotCurveSet::setCellFilterView(RimGridView* cellFilterView)
|
||||
{
|
||||
m_cellFilterView = cellFilterView;
|
||||
m_groupingProperty->setReservoirView(dynamic_cast<RimEclipseView*>(m_cellFilterView()));
|
||||
auto eclipseView = dynamic_cast<RimEclipseView*>(m_cellFilterView());
|
||||
|
||||
if (eclipseView)
|
||||
{
|
||||
m_groupingProperty->setReservoirView(eclipseView);
|
||||
RigEclipseResultAddress resAddr = eclipseView->cellResult()->eclipseResultAddress();
|
||||
if (resAddr.isValid())
|
||||
{
|
||||
m_xAxisProperty->setResultType(resAddr.m_resultCatType);
|
||||
m_xAxisProperty->setResultVariable(resAddr.m_resultName);
|
||||
m_yAxisProperty->setResultType(RiaDefines::STATIC_NATIVE);
|
||||
m_yAxisProperty->setResultVariable("DEPTH");
|
||||
m_timeStep = eclipseView->currentTimeStep();
|
||||
m_grouping = NO_GROUPING;
|
||||
|
||||
RimGridCrossPlot* parentPlot = nullptr;
|
||||
firstAncestorOrThisOfType(parentPlot);
|
||||
if (parentPlot)
|
||||
{
|
||||
parentPlot->setYAxisInverted(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -980,11 +1002,11 @@ void RimGridCrossPlotCurveSet::setDefaults()
|
||||
m_yAxisProperty->setEclipseCase(eclipseCase);
|
||||
m_groupingProperty->setEclipseCase(eclipseCase);
|
||||
|
||||
m_xAxisProperty->setResultType(RiaDefines::DYNAMIC_NATIVE);
|
||||
m_xAxisProperty->setResultVariable("SOIL");
|
||||
m_xAxisProperty->setResultType(RiaDefines::STATIC_NATIVE);
|
||||
m_xAxisProperty->setResultVariable("PORO");
|
||||
|
||||
m_yAxisProperty->setResultType(RiaDefines::DYNAMIC_NATIVE);
|
||||
m_yAxisProperty->setResultVariable("PRESSURE");
|
||||
m_yAxisProperty->setResultType(RiaDefines::STATIC_NATIVE);
|
||||
m_yAxisProperty->setResultVariable("PERMX");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -302,6 +302,14 @@ bool RimPlotAxisProperties::isAxisInverted() const
|
||||
return m_isAxisInverted();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPlotAxisProperties::setAxisInverted(bool inverted)
|
||||
{
|
||||
m_isAxisInverted = inverted;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -68,6 +68,7 @@ public:
|
||||
bool isAutoZoom() const;
|
||||
void setAutoZoom(bool enableAutoZoom);
|
||||
bool isAxisInverted() const;
|
||||
void setAxisInverted(bool inverted);
|
||||
|
||||
caf::PdmField<QString> customTitle;
|
||||
caf::PdmField<int> titleFontSize;
|
||||
|
Loading…
Reference in New Issue
Block a user