Fix Well Log Plot depth axis label

This commit is contained in:
Gaute Lindkvist 2019-10-03 15:45:20 +02:00
parent 1309db884d
commit 45d6acadaa
4 changed files with 4 additions and 7 deletions

View File

@ -839,10 +839,6 @@ void RimWellLogTrack::loadDataAndUpdate( bool updateParentPlotAndToolbars )
if ( wellLogPlot && m_wellLogTrackPlotWidget ) if ( wellLogPlot && m_wellLogTrackPlotWidget )
{ {
if ( isFirstVisibleTrackInPlot() )
{
m_wellLogTrackPlotWidget->setDepthTitle( wellLogPlot->depthPlotTitle() );
}
m_wellLogTrackPlotWidget->setXTitle( m_xAxisTitle ); m_wellLogTrackPlotWidget->setXTitle( m_xAxisTitle );
} }

View File

@ -348,7 +348,8 @@ void RiuWellLogPlot::reinsertTracks()
m_legends[tIdx]->hide(); m_legends[tIdx]->hide();
} }
m_trackPlots[tIdx]->enableDepthAxisLabelsAndTitle( visibleIndex == 0 ); m_trackPlots[tIdx]->setDepthTitle( visibleIndex == 0 ? m_plotDefinition->depthPlotTitle() : "" );
m_trackPlots[tIdx]->enableDepthAxisLabelsAndTicks( visibleIndex == 0 );
m_trackPlots[tIdx]->show(); m_trackPlots[tIdx]->show();
m_trackLayout->addWidget( m_legends[tIdx], 0, static_cast<int>( visibleIndex ) ); m_trackLayout->addWidget( m_legends[tIdx], 0, static_cast<int>( visibleIndex ) );

View File

@ -268,7 +268,7 @@ bool RiuWellLogTrack::isRimTrackVisible()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RiuWellLogTrack::enableDepthAxisLabelsAndTitle( bool enable ) void RiuWellLogTrack::enableDepthAxisLabelsAndTicks( bool enable )
{ {
this->axisScaleDraw( QwtPlot::yLeft )->enableComponent( QwtAbstractScaleDraw::Ticks, enable ); this->axisScaleDraw( QwtPlot::yLeft )->enableComponent( QwtAbstractScaleDraw::Ticks, enable );
this->axisScaleDraw( QwtPlot::yLeft )->enableComponent( QwtAbstractScaleDraw::Labels, enable ); this->axisScaleDraw( QwtPlot::yLeft )->enableComponent( QwtAbstractScaleDraw::Labels, enable );

View File

@ -52,7 +52,7 @@ public:
void setXRange( double min, double max, QwtPlot::Axis axis = QwtPlot::xTop ); void setXRange( double min, double max, QwtPlot::Axis axis = QwtPlot::xTop );
bool isRimTrackVisible(); bool isRimTrackVisible();
void enableDepthAxisLabelsAndTitle( bool enable ); void enableDepthAxisLabelsAndTicks( bool enable );
int widthScaleFactor() const; int widthScaleFactor() const;
void enableXGridLines( bool majorGridLines, bool minorGridLines ); void enableXGridLines( bool majorGridLines, bool minorGridLines );
void enableDepthGridLines( bool majorGridLines, bool minorGridLines ); void enableDepthGridLines( bool majorGridLines, bool minorGridLines );