#9092 WLP: show only axis for first and last track.

This commit is contained in:
Kristian Bendiksen
2022-08-10 08:39:03 +02:00
committed by Magne Sjaastad
parent e984e634e7
commit d9aa8bd6d2
4 changed files with 53 additions and 4 deletions

View File

@@ -1290,13 +1290,21 @@ void RimWellLogTrack::onLoadDataAndUpdate()
if ( wellLogPlot->depthOrientation() == RimDepthTrackPlot::DepthOrientation::VERTICAL )
{
// Show depth axis only for the first track (on the left side)
bool isFirstTrack = wellLogPlot->isFirstVisibleTrack( this );
m_plotWidget->setAxisEnabled( QwtAxis::XTop, true );
m_plotWidget->setAxisEnabled( QwtAxis::XBottom, false );
m_plotWidget->setAxisEnabled( QwtAxis::YLeft, isFirstTrack );
m_plotWidget->setAxisEnabled( QwtAxis::YRight, false );
}
else
{
// Show depth axis only for the last track (on the bottom side)
bool isLastTrack = wellLogPlot->isLastVisibleTrack( this );
m_plotWidget->setAxisEnabled( QwtAxis::XTop, false );
m_plotWidget->setAxisEnabled( QwtAxis::XBottom, true );
m_plotWidget->setAxisEnabled( QwtAxis::XBottom, isLastTrack );
m_plotWidget->setAxisEnabled( QwtAxis::YLeft, true );
m_plotWidget->setAxisEnabled( QwtAxis::YRight, false );
}
}