Well Log Plot: avoid hard-coding depth/value axis

This commit is contained in:
Kristian Bendiksen 2022-08-12 08:36:52 +02:00
parent b4bca2276f
commit 413288df0a

View File

@ -231,12 +231,15 @@ void RimWellLogCurve::updateCurveAppearance()
RimDepthTrackPlot* wellLogPlot = nullptr;
firstAncestorOrThisOfType( wellLogPlot );
if ( wellLogPlot ) orientation = wellLogPlot->depthOrientation();
if ( wellLogPlot )
{
orientation = wellLogPlot->depthOrientation();
if ( m_plotCurve )
{
m_plotCurve->setXAxis( RiuPlotAxis::defaultTop() );
m_plotCurve->setYAxis( RiuPlotAxis::defaultLeft() );
m_plotCurve->setXAxis( wellLogPlot->valueAxis() );
m_plotCurve->setYAxis( wellLogPlot->depthAxis() );
}
}
if ( fillStyle() != Qt::BrushStyle::NoBrush )
@ -252,7 +255,7 @@ void RimWellLogCurve::updateCurveAppearance()
else
{
qwtPlotCurve->setOrientation( Qt::Vertical );
qwtPlotCurve->setBaseline( 0.0 );
qwtPlotCurve->setBaseline( -std::numeric_limits<double>::infinity() );
}
}
}