mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#739 Added summary case classes. Use those from the summary curves. Made save/restore work again for the summary plots. File format for Summary stuff are changed.
This commit is contained in:
@@ -31,6 +31,9 @@
|
||||
#include "RimSummaryCurve.h"
|
||||
#include "RiuMainWindow.h"
|
||||
#include "cafSelectionManager.h"
|
||||
#include "WellLogCommands\RicWellLogPlotCurveFeatureImpl.h"
|
||||
#include "RimOilField.h"
|
||||
#include "RimSummaryCaseCollection.h"
|
||||
|
||||
|
||||
CAF_CMD_SOURCE_INIT(RicNewSummaryCurveFeature, "RicNewSummaryCurveFeature");
|
||||
@@ -62,10 +65,22 @@ void RicNewSummaryCurveFeature::onActionTriggered(bool isChecked)
|
||||
{
|
||||
RimSummaryCurve* newCurve = new RimSummaryCurve();
|
||||
plot->addCurve(newCurve);
|
||||
|
||||
cvf::Color3f curveColor = RicWellLogPlotCurveFeatureImpl::curveColorFromTable();
|
||||
newCurve->setColor(curveColor);
|
||||
|
||||
RimSummaryCase* defaultCase = nullptr;
|
||||
if (project->activeOilField()->summaryCaseCollection()->summaryCaseCount() > 0)
|
||||
{
|
||||
defaultCase = project->activeOilField()->summaryCaseCollection()->summaryCase(0);
|
||||
newCurve->setSummaryCase(defaultCase);
|
||||
newCurve->setVariable("FOPT");
|
||||
newCurve->loadDataAndUpdate();
|
||||
}
|
||||
|
||||
plot->updateConnectedEditors();
|
||||
|
||||
RiuMainWindow::instance()->selectAsCurrentItem(newCurve);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user