(#436) Refactored curve creation features

Moved common code to new base class.
This commit is contained in:
Pål Hagen
2015-09-15 15:58:22 +02:00
parent e4212a1135
commit e81a1c69c0
7 changed files with 99 additions and 35 deletions
@@ -73,11 +73,16 @@ void RicAddWellLogToPlotFeature::onActionTriggered(bool isChecked)
wellLog->firstAnchestorOrThisOfType(lasFileInfo);
if (lasFileInfo)
{
size_t curveIdx = plotTrace->curveCount();
RimWellLogFileCurve* curve = new RimWellLogFileCurve;
plotTrace->addCurve(curve);
curve->setCurveData(lasFileInfo->logValues(wellLog->name()), lasFileInfo->depthValues());
cvf::Color3f curveColor = curveColorFromIndex(curveIdx);
curve->setColor(curveColor);
curve->setDescription(wellLog->name());
curve->setCurveData(lasFileInfo->logValues(wellLog->name()), lasFileInfo->depthValues());
curve->updatePlotData();
}
}