diff --git a/ApplicationCode/Commands/RicWellLogTools.cpp b/ApplicationCode/Commands/RicWellLogTools.cpp index 8dfa71eedc..0847d8b6c3 100644 --- a/ApplicationCode/Commands/RicWellLogTools.cpp +++ b/ApplicationCode/Commands/RicWellLogTools.cpp @@ -19,6 +19,7 @@ #include "RicWellLogTools.h" #include "RiaGuiApplication.h" +#include "RigWellLogCurveData.h" #include "Rim3dView.h" #include "RimCase.h" @@ -274,7 +275,16 @@ ExtractionCurveType* RicWellLogTools::addExtractionCurve( RimWellLogTrack* plotTrack->addCurve( curve ); + if ( plot && curve->curveData() ) + { + plot->setDepthUnit( curve->curveData()->depthUnit() ); + } + + curve->loadDataAndUpdate( true ); + + curve->updateConnectedEditors(); plotTrack->updateConnectedEditors(); + plot->updateConnectedEditors(); RiaApplication::instance()->project()->updateConnectedEditors(); RiaGuiApplication::instance()->getOrCreateMainPlotWindow(); diff --git a/ApplicationCode/Commands/WellLogCommands/RicNewWellLogCurveExtractionFeature.cpp b/ApplicationCode/Commands/WellLogCommands/RicNewWellLogCurveExtractionFeature.cpp index 76fb7049b6..433903560f 100644 --- a/ApplicationCode/Commands/WellLogCommands/RicNewWellLogCurveExtractionFeature.cpp +++ b/ApplicationCode/Commands/WellLogCommands/RicNewWellLogCurveExtractionFeature.cpp @@ -123,16 +123,6 @@ void RicNewWellLogCurveExtractionFeature::onActionTriggered( bool isChecked ) simWell, branchIndex, useBranchDetection ); - - plotCurve->loadDataAndUpdate( true ); - - newWellLogPlotTrack->firstAncestorOrThisOfType( wellLogPlot ); - if ( wellLogPlot && plotCurve->curveData() ) - { - wellLogPlot->setDepthUnit( plotCurve->curveData()->depthUnit() ); - } - - plotCurve->updateConnectedEditors(); } } RiuPlotMainWindowTools::refreshToolbars();