#2243 Summary Plot : Reorganize axis properties fields

This commit is contained in:
Magne Sjaastad
2017-12-12 08:35:37 +01:00
parent 96b1fc9160
commit ab53135f91
3 changed files with 40 additions and 38 deletions

View File

@@ -156,7 +156,7 @@ void RimSummaryPlot::updateAxes()
//--------------------------------------------------------------------------------------------------
bool RimSummaryPlot::isLogarithmicScaleEnabled(RiaDefines::PlotAxis plotAxis) const
{
return yAxisPropertiesForAxis(plotAxis)->isLogarithmicScaleEnabled();
return yAxisPropertiesLeftOrRight(plotAxis)->isLogarithmicScaleEnabled();
}
//--------------------------------------------------------------------------------------------------
@@ -516,7 +516,7 @@ void RimSummaryPlot::updateAxis(RiaDefines::PlotAxis plotAxis)
qwtAxis = QwtPlot::yRight;
}
RimSummaryAxisProperties* yAxisProperties = yAxisPropertiesForAxis(plotAxis);
RimSummaryAxisProperties* yAxisProperties = yAxisPropertiesLeftOrRight(plotAxis);
if (yAxisProperties->isActive() && hasVisibleCurvesForAxis(plotAxis))
{
m_qwtPlot->enableAxis(qwtAxis, true);
@@ -545,7 +545,7 @@ void RimSummaryPlot::updateAxis(RiaDefines::PlotAxis plotAxis)
//--------------------------------------------------------------------------------------------------
void RimSummaryPlot::updateZoomForAxis(RiaDefines::PlotAxis plotAxis)
{
RimSummaryAxisProperties* yAxisProps = yAxisPropertiesForAxis(plotAxis);
RimSummaryAxisProperties* yAxisProps = yAxisPropertiesLeftOrRight(plotAxis);
if (yAxisProps->isLogarithmicScaleEnabled)
{
@@ -648,11 +648,11 @@ bool RimSummaryPlot::hasVisibleCurvesForAxis(RiaDefines::PlotAxis plotAxis) cons
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimSummaryAxisProperties* RimSummaryPlot::yAxisPropertiesForAxis(RiaDefines::PlotAxis plotAxis) const
RimSummaryAxisProperties* RimSummaryPlot::yAxisPropertiesLeftOrRight(RiaDefines::PlotAxis leftOrRightPlotAxis) const
{
RimSummaryAxisProperties* yAxisProps = nullptr;
if (plotAxis == RiaDefines::PLOT_AXIS_LEFT)
if (leftOrRightPlotAxis == RiaDefines::PLOT_AXIS_LEFT)
{
yAxisProps = m_leftYAxisProperties();
}