mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1322 Several refactorings of RimSummaryPlot, added TimeHistoryCurve support
Removed unique_pointer, as childFields now owns (and deletes) the contained object Simplified extraction of visible curves Simplified calculation of zoom range
This commit is contained in:
@@ -399,14 +399,12 @@ void RiuSummaryQwtPlot::setDefaults()
|
||||
axisTitleY.setRenderFlags(Qt::AlignRight);
|
||||
setAxisTitle(QwtPlot::yLeft, axisTitleY);
|
||||
|
||||
|
||||
QwtLegend* legend = new QwtLegend(this);
|
||||
// The legend will be deleted in the destructor of the plot or when
|
||||
// another legend is inserted.
|
||||
this->insertLegend(legend, BottomLegend);
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -420,7 +418,6 @@ void RiuSummaryQwtPlot::useDateBasedTimeAxis()
|
||||
setAxisScaleDraw(QwtPlot::xBottom, scaleDraw);
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -490,7 +487,7 @@ void RiuSummaryQwtPlot::selectClosestCurve(const QPoint& pos)
|
||||
|
||||
if(closestCurve && distMin < 20)
|
||||
{
|
||||
RimSummaryCurve* selectedCurve = m_plotDefinition->findRimCurveFromQwtCurve(closestCurve);
|
||||
caf::PdmObject* selectedCurve = m_plotDefinition->findRimCurveFromQwtCurve(closestCurve);
|
||||
if(selectedCurve)
|
||||
{
|
||||
RiaApplication::instance()->getOrCreateAndShowMainPlotWindow()->selectAsCurrentItem(selectedCurve);
|
||||
@@ -508,7 +505,7 @@ void RiuSummaryQwtPlot::onZoomedSlot()
|
||||
|
||||
this->setZoomWindow(left, right, time);
|
||||
|
||||
m_plotDefinition->updateZoomFromQwt();
|
||||
m_plotDefinition->updateZoomWindowFromQwt();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user