mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#396) Fixed updating of plot traces when adding curves
Made sure that plot traces are updated as expected when adding curves to plot traces with index > 0.
This commit is contained in:
parent
1b9977239d
commit
eda2ce27d6
@ -175,22 +175,24 @@ void RimWellLogExtractionCurve::updatePlotData()
|
||||
|
||||
if (filteredValues.size())
|
||||
{
|
||||
RimWellLogPlotTrace* plotTrace;
|
||||
firstAnchestorOrThisOfType(plotTrace);
|
||||
|
||||
RimWellLogPlot* wellLogPlot;
|
||||
firstAnchestorOrThisOfType(wellLogPlot);
|
||||
|
||||
if (wellLogPlot)
|
||||
if (wellLogPlot && plotTrace)
|
||||
{
|
||||
bool setDepthRange = !wellLogPlot->hasAvailableDepthRange();
|
||||
wellLogPlot->updateAvailableDepthRange();
|
||||
|
||||
if (setDepthRange && wellLogPlot->traceCount() == 1)
|
||||
if (setDepthRange)
|
||||
{
|
||||
RimWellLogPlotTrace* plotTrace;
|
||||
firstAnchestorOrThisOfType(plotTrace);
|
||||
if (plotTrace && plotTrace->curveCount() == 1)
|
||||
{
|
||||
wellLogPlot->setVisibleDepthRangeFromContents();
|
||||
}
|
||||
wellLogPlot->setVisibleDepthRangeFromContents();
|
||||
}
|
||||
else if (plotTrace->curveCount() == 1)
|
||||
{
|
||||
plotTrace->updateAxisRanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -208,7 +208,7 @@ void RimWellLogPlotTrace::updateAxisRanges()
|
||||
double minimumDepth, maximumDepth;
|
||||
wellLogPlot->visibleDepthRange(&minimumDepth, &maximumDepth);
|
||||
|
||||
m_viewer->setAxisScale(QwtPlot::yLeft, minimumDepth, maximumDepth);
|
||||
m_viewer->setDepthRange(minimumDepth, maximumDepth);
|
||||
rangesChanged = true;
|
||||
}
|
||||
|
||||
|
@ -77,6 +77,7 @@ void RiuWellLogPlot::setDepthRange(double minDepth, double maxDepth)
|
||||
for (int tpIdx = 0; tpIdx < m_tracePlots.count(); tpIdx++)
|
||||
{
|
||||
m_tracePlots[tpIdx]->setDepthRange(minDepth, maxDepth);
|
||||
m_tracePlots[tpIdx]->replot();
|
||||
}
|
||||
|
||||
updateScrollBar(minDepth, maxDepth);
|
||||
|
@ -118,7 +118,7 @@ void RiuWellLogTracePlot::setDepthRange(double minDepth, double maxDepth)
|
||||
{
|
||||
// Note: Y-axis is inverted
|
||||
setAxisScale(QwtPlot::yLeft, maxDepth, minDepth);
|
||||
replot();
|
||||
//replot();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user