(#538) Make sure curve data is populated before used

This commit is contained in:
Magne Sjaastad 2015-12-03 07:26:19 +01:00
parent ac2a28f139
commit 57b0e7b18d

View File

@ -68,14 +68,15 @@ void RicNewWellLogCurveExtractionFeature::onActionTriggered(bool isChecked)
RimWellLogTrack* wellLogPlotTrack = RicNewWellLogPlotFeatureImpl::createWellLogPlotTrack(); RimWellLogTrack* wellLogPlotTrack = RicNewWellLogPlotFeatureImpl::createWellLogPlotTrack();
RimWellLogExtractionCurve* plotCurve = addCurve(wellLogPlotTrack, RiaApplication::instance()->activeReservoirView(), wellPath); RimWellLogExtractionCurve* plotCurve = addCurve(wellLogPlotTrack, RiaApplication::instance()->activeReservoirView(), wellPath);
plotCurve->updatePlotData();
RimWellLogPlot* plot = NULL; RimWellLogPlot* plot = NULL;
wellLogPlotTrack->firstAnchestorOrThisOfType(plot); wellLogPlotTrack->firstAnchestorOrThisOfType(plot);
if (plot) if (plot && plotCurve->curveData())
{ {
plot->setDepthUnit(plotCurve->curveData()->depthUnit()); plot->setDepthUnit(plotCurve->curveData()->depthUnit());
} }
plotCurve->updatePlotData();
plotCurve->updateConnectedEditors(); plotCurve->updateConnectedEditors();
} }
} }