mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
@@ -93,6 +93,12 @@ void RicAddWellLogToPlotFeature::onActionTriggered(bool isChecked)
|
|||||||
RigWellLogFile* wellLogDataFile = wellLogFile->wellLogFile();
|
RigWellLogFile* wellLogDataFile = wellLogFile->wellLogFile();
|
||||||
CVF_ASSERT(wellLogDataFile);
|
CVF_ASSERT(wellLogDataFile);
|
||||||
|
|
||||||
|
if (wlIdx == 0)
|
||||||
|
{
|
||||||
|
// Initialize plot with depth unit from the first log file
|
||||||
|
plot->setDepthUnit(wellLogDataFile->depthUnit());
|
||||||
|
}
|
||||||
|
|
||||||
cvf::Color3f curveColor = RicWellLogPlotCurveFeatureImpl::curveColorFromTable();
|
cvf::Color3f curveColor = RicWellLogPlotCurveFeatureImpl::curveColorFromTable();
|
||||||
curve->setColor(curveColor);
|
curve->setColor(curveColor);
|
||||||
curve->setWellPath(wellPath);
|
curve->setWellPath(wellPath);
|
||||||
|
|||||||
@@ -22,12 +22,13 @@
|
|||||||
#include "RicWellLogPlotCurveFeatureImpl.h"
|
#include "RicWellLogPlotCurveFeatureImpl.h"
|
||||||
#include "RicNewWellLogPlotFeatureImpl.h"
|
#include "RicNewWellLogPlotFeatureImpl.h"
|
||||||
|
|
||||||
#include "RimWellLogTrack.h"
|
#include "RimProject.h"
|
||||||
|
#include "RimView.h"
|
||||||
#include "RimWellLogExtractionCurve.h"
|
#include "RimWellLogExtractionCurve.h"
|
||||||
|
#include "RimWellLogPlot.h"
|
||||||
|
#include "RimWellLogTrack.h"
|
||||||
#include "RimWellPath.h"
|
#include "RimWellPath.h"
|
||||||
#include "RimWellPathCollection.h"
|
#include "RimWellPathCollection.h"
|
||||||
#include "RimView.h"
|
|
||||||
#include "RimProject.h"
|
|
||||||
|
|
||||||
#include "RiuMainWindow.h"
|
#include "RiuMainWindow.h"
|
||||||
#include "RiaApplication.h"
|
#include "RiaApplication.h"
|
||||||
@@ -66,6 +67,13 @@ 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);
|
||||||
|
|
||||||
|
RimWellLogPlot* plot = NULL;
|
||||||
|
wellLogPlotTrack->firstAnchestorOrThisOfType(plot);
|
||||||
|
if (plot)
|
||||||
|
{
|
||||||
|
plot->setDepthUnit(plotCurve->curveData()->depthUnit());
|
||||||
|
}
|
||||||
|
|
||||||
plotCurve->updatePlotData();
|
plotCurve->updatePlotData();
|
||||||
plotCurve->updateConnectedEditors();
|
plotCurve->updateConnectedEditors();
|
||||||
|
|||||||
@@ -19,50 +19,16 @@
|
|||||||
|
|
||||||
#include "RicNewWellLogPlotFeatureImpl.h"
|
#include "RicNewWellLogPlotFeatureImpl.h"
|
||||||
|
|
||||||
#include "RimProject.h"
|
|
||||||
#include "RimMainPlotCollection.h"
|
#include "RimMainPlotCollection.h"
|
||||||
#include "RimWellLogPlotCollection.h"
|
#include "RimProject.h"
|
||||||
#include "RimWellLogPlot.h"
|
#include "RimWellLogPlot.h"
|
||||||
|
#include "RimWellLogPlotCollection.h"
|
||||||
#include "RimWellLogTrack.h"
|
#include "RimWellLogTrack.h"
|
||||||
|
|
||||||
#include "RiaApplication.h"
|
#include "RiaApplication.h"
|
||||||
|
|
||||||
#include "cvfAssert.h"
|
#include "cvfAssert.h"
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
///
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
RimMainPlotCollection* RicNewWellLogPlotFeatureImpl::mainPlotCollection()
|
|
||||||
{
|
|
||||||
RimProject* project = RiaApplication::instance()->project();
|
|
||||||
CVF_ASSERT(project);
|
|
||||||
|
|
||||||
RimMainPlotCollection* mainPlotColl = project->mainPlotCollection();
|
|
||||||
if (!mainPlotColl)
|
|
||||||
{
|
|
||||||
project->recreateMainPlotCollection();
|
|
||||||
}
|
|
||||||
|
|
||||||
return project->mainPlotCollection();
|
|
||||||
}
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
///
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
RimWellLogPlotCollection* RicNewWellLogPlotFeatureImpl::wellLogPlotCollection()
|
|
||||||
{
|
|
||||||
RimMainPlotCollection* mainPlotColl = mainPlotCollection();
|
|
||||||
CVF_ASSERT(mainPlotColl);
|
|
||||||
|
|
||||||
RimWellLogPlotCollection* wellLogPlotColl = mainPlotColl->wellLogPlotCollection();
|
|
||||||
if (!wellLogPlotColl)
|
|
||||||
{
|
|
||||||
mainPlotColl->recreateWellLogPlotCollection();
|
|
||||||
}
|
|
||||||
|
|
||||||
return mainPlotColl->wellLogPlotCollection();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
@@ -97,3 +63,20 @@ RimWellLogTrack* RicNewWellLogPlotFeatureImpl::createWellLogPlotTrack()
|
|||||||
|
|
||||||
return plotTrack;
|
return plotTrack;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
RimWellLogPlotCollection* RicNewWellLogPlotFeatureImpl::wellLogPlotCollection()
|
||||||
|
{
|
||||||
|
RimProject* project = RiaApplication::instance()->project();
|
||||||
|
CVF_ASSERT(project);
|
||||||
|
|
||||||
|
RimMainPlotCollection* mainPlotColl = project->mainPlotCollection();
|
||||||
|
CVF_ASSERT(mainPlotColl);
|
||||||
|
|
||||||
|
RimWellLogPlotCollection* wellLogPlotColl = mainPlotColl->wellLogPlotCollection();
|
||||||
|
CVF_ASSERT(wellLogPlotColl);
|
||||||
|
|
||||||
|
return mainPlotColl->wellLogPlotCollection();
|
||||||
|
}
|
||||||
|
|||||||
@@ -19,7 +19,6 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
class RimMainPlotCollection;
|
|
||||||
class RimWellLogPlotCollection;
|
class RimWellLogPlotCollection;
|
||||||
class RimWellLogPlot;
|
class RimWellLogPlot;
|
||||||
class RimWellLogTrack;
|
class RimWellLogTrack;
|
||||||
@@ -30,9 +29,9 @@ class RimWellLogTrack;
|
|||||||
class RicNewWellLogPlotFeatureImpl
|
class RicNewWellLogPlotFeatureImpl
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
static RimWellLogPlot* createWellLogPlot();
|
||||||
|
static RimWellLogTrack* createWellLogPlotTrack();
|
||||||
|
|
||||||
static RimMainPlotCollection* mainPlotCollection();
|
private:
|
||||||
static RimWellLogPlotCollection* wellLogPlotCollection();
|
static RimWellLogPlotCollection* wellLogPlotCollection();
|
||||||
static RimWellLogPlot* createWellLogPlot();
|
|
||||||
static RimWellLogTrack* createWellLogPlotTrack();
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -65,17 +65,6 @@ caf::PdmFieldHandle* RimMainPlotCollection::objectToggleField()
|
|||||||
return &show;
|
return &show;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
///
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
void RimMainPlotCollection::recreateWellLogPlotCollection()
|
|
||||||
{
|
|
||||||
if (!wellLogPlotCollection())
|
|
||||||
{
|
|
||||||
m_wellLogPlotCollection = new RimWellLogPlotCollection();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -38,7 +38,6 @@ public:
|
|||||||
virtual ~RimMainPlotCollection();
|
virtual ~RimMainPlotCollection();
|
||||||
|
|
||||||
RimWellLogPlotCollection* wellLogPlotCollection();
|
RimWellLogPlotCollection* wellLogPlotCollection();
|
||||||
void recreateWellLogPlotCollection();
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
|||||||
@@ -735,14 +735,3 @@ void RimProject::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QS
|
|||||||
uiTreeOrdering.setForgetRemainingFields(true);
|
uiTreeOrdering.setForgetRemainingFields(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
///
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
void RimProject::recreateMainPlotCollection()
|
|
||||||
{
|
|
||||||
if (!mainPlotCollection())
|
|
||||||
{
|
|
||||||
mainPlotCollection = new RimMainPlotCollection();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
@@ -93,8 +93,6 @@ public:
|
|||||||
|
|
||||||
void actionsBasedOnSelection(QMenu& contextMenu);
|
void actionsBasedOnSelection(QMenu& contextMenu);
|
||||||
|
|
||||||
void recreateMainPlotCollection();
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Overridden methods
|
// Overridden methods
|
||||||
void initScriptDirectories();
|
void initScriptDirectories();
|
||||||
|
|||||||
@@ -560,3 +560,13 @@ size_t RimWellLogPlot::trackIndex(RimWellLogTrack* track)
|
|||||||
return m_tracks.index(track);
|
return m_tracks.index(track);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimWellLogPlot::setDepthUnit(RimDefines::DepthUnitType depthUnit)
|
||||||
|
{
|
||||||
|
m_depthUnit = depthUnit;
|
||||||
|
|
||||||
|
updateTracks();
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,10 @@ public:
|
|||||||
void setDescription(const QString& description);
|
void setDescription(const QString& description);
|
||||||
|
|
||||||
DepthTypeEnum depthType() const;
|
DepthTypeEnum depthType() const;
|
||||||
|
|
||||||
RimDefines::DepthUnitType depthUnit() const;
|
RimDefines::DepthUnitType depthUnit() const;
|
||||||
|
void setDepthUnit(RimDefines::DepthUnitType depthUnit);
|
||||||
|
|
||||||
QString depthPlotTitle() const;
|
QString depthPlotTitle() const;
|
||||||
|
|
||||||
caf::PdmField< std::vector<int> > windowGeometry;
|
caf::PdmField< std::vector<int> > windowGeometry;
|
||||||
|
|||||||
Reference in New Issue
Block a user