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