mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Merge pull request #5243 from OPM/bug-#5234-summary-xplot-axis
#5234 Fix auto scale of cross plot x-axis
This commit is contained in:
commit
a9548c8c01
@ -27,6 +27,7 @@
|
||||
#include "RiuSummaryQuantityNameInfoProvider.h"
|
||||
#include "RiuSummaryQwtPlot.h"
|
||||
|
||||
#include "qwt_date_scale_engine.h"
|
||||
#include "qwt_plot_curve.h"
|
||||
#include "qwt_scale_draw.h"
|
||||
#include "qwt_scale_engine.h"
|
||||
@ -168,7 +169,8 @@ void RimSummaryPlotAxisFormatter::applyAxisPropertiesToPlot( RiuSummaryQwtPlot*
|
||||
{
|
||||
QwtLinearScaleEngine* currentScaleEngine = dynamic_cast<QwtLinearScaleEngine*>(
|
||||
qwtPlot->axisScaleEngine( m_axisProperties->qwtPlotAxisType() ) );
|
||||
if ( !currentScaleEngine )
|
||||
QwtDateScaleEngine* dateScaleEngine = dynamic_cast<QwtDateScaleEngine*>( currentScaleEngine );
|
||||
if ( !currentScaleEngine || dateScaleEngine )
|
||||
{
|
||||
qwtPlot->setAxisScaleEngine( m_axisProperties->qwtPlotAxisType(), new QwtLinearScaleEngine );
|
||||
qwtPlot->setAxisMaxMinor( m_axisProperties->qwtPlotAxisType(), 3 );
|
||||
|
Loading…
Reference in New Issue
Block a user