Added command feature for addition of a new curve to a well log plot trace

This commit is contained in:
Pål Hagen
2015-08-28 11:45:18 +02:00
parent 0fdf5292d0
commit 7081e140fd
6 changed files with 133 additions and 0 deletions

View File

@@ -553,6 +553,7 @@ void RimProject::computeUtmAreaOfInterest()
#include "RimEclipseCellColors.h"
#include "RimEclipseFaultColors.h"
#include "RimWellLogPlot.h"
#include "RimWellLogPlotTrace.h"
#include <QMenu>
@@ -727,6 +728,10 @@ void RimProject::actionsBasedOnSelection(QMenu& contextMenu)
{
commandIds << "RicNewWellLogPlotTraceFeature";
}
else if (dynamic_cast<RimWellLogPlotTrace*>(uiItem))
{
commandIds << "RicNewWellLogPlotCurveFeature";
}
if (dynamic_cast<RimManagedViewCollection*>(uiItem))
{

View File

@@ -21,6 +21,9 @@
#include "RimWellLogPlotCurve.h"
#include "RiuMainWindow.h"
#include "cafPdmUiTreeView.h"
CAF_PDM_SOURCE_INIT(RimWellLogPlotTrace, "WellLogPlotTrace");
@@ -59,3 +62,16 @@ caf::PdmFieldHandle* RimWellLogPlotTrace::objectToggleField()
{
return &show;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellLogPlotTrace::addCurve()
{
RimWellLogPlotCurve* curve = new RimWellLogPlotCurve();
curves.push_back(curve);
RiuMainWindow::instance()->projectTreeView()->setExpanded(this, true);
updateConnectedEditors();
}

View File

@@ -36,6 +36,8 @@ public:
RimWellLogPlotTrace();
virtual ~RimWellLogPlotTrace();
void addCurve();
protected:
// Overridden PDM methods