mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4156 Don't show the common part of Grid Cross Plout curve names in legend
This commit is contained in:
@@ -17,6 +17,8 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
#include "RimGridCrossPlot.h"
|
||||
|
||||
#include "RiaGridCrossPlotCurveNameHelper.h"
|
||||
|
||||
#include "RiuSummaryQwtPlot.h"
|
||||
#include "RiuPlotMainWindowTools.h"
|
||||
#include "RiuQwtPlotTools.h"
|
||||
@@ -190,7 +192,7 @@ QString RimGridCrossPlot::createAutoName() const
|
||||
}
|
||||
if (!dataSets.isEmpty())
|
||||
{
|
||||
autoName += QString("(%1)").arg(dataSets.join(", "));
|
||||
autoName += QString("(%1)").arg(dataSets.join("; "));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -333,7 +335,7 @@ void RimGridCrossPlot::onLoadDataAndUpdate()
|
||||
curveSet->loadDataAndUpdate(false);
|
||||
}
|
||||
|
||||
performAutoNameUpdate();
|
||||
updateCurveNamesAndPlotTitle();
|
||||
updateAllRequiredEditors();
|
||||
|
||||
updatePlot();
|
||||
@@ -415,10 +417,7 @@ QList<caf::PdmOptionItemInfo> RimGridCrossPlot::calculateValueOptions(const caf:
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimGridCrossPlot::performAutoNameUpdate()
|
||||
{
|
||||
if (m_qwtPlot)
|
||||
{
|
||||
m_qwtPlot->setTitle(this->createAutoName());
|
||||
}
|
||||
updateCurveNamesAndPlotTitle();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -456,6 +455,19 @@ void RimGridCrossPlot::updatePlot()
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimGridCrossPlot::updateCurveNamesAndPlotTitle()
|
||||
{
|
||||
updateCurveNames();
|
||||
|
||||
if (m_qwtPlot)
|
||||
{
|
||||
m_qwtPlot->setTitle(this->createAutoName());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -599,6 +611,21 @@ void RimGridCrossPlot::updateAxisFromQwt(RiaDefines::PlotAxis axisType)
|
||||
axisProperties->updateConnectedEditors();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimGridCrossPlot::updateCurveNames()
|
||||
{
|
||||
m_curveNameHelper.reset();
|
||||
|
||||
for (auto curveSet : m_crossPlotCurveSets())
|
||||
{
|
||||
m_curveNameHelper.addCurveSet(curveSet);
|
||||
}
|
||||
|
||||
m_curveNameHelper.applyCurveNames();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Name Configuration
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user