mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#396) Adding a trace when creating a new well log plot
Did some refactoring - moved creation code to command feature.
This commit is contained in:
parent
2288130f6a
commit
bcab7f2248
@ -22,8 +22,11 @@
|
|||||||
#include "RimProject.h"
|
#include "RimProject.h"
|
||||||
#include "RimMainPlotCollection.h"
|
#include "RimMainPlotCollection.h"
|
||||||
#include "RimWellLogPlotCollection.h"
|
#include "RimWellLogPlotCollection.h"
|
||||||
|
#include "RimWellLogPlot.h"
|
||||||
|
#include "RimWellLogPlotTrace.h"
|
||||||
|
|
||||||
#include "RiaApplication.h"
|
#include "RiaApplication.h"
|
||||||
|
#include "RiuMainWindow.h"
|
||||||
|
|
||||||
#include <QAction>
|
#include <QAction>
|
||||||
|
|
||||||
@ -46,7 +49,14 @@ void RicNewWellLogPlotFeature::onActionTriggered(bool isChecked)
|
|||||||
RimWellLogPlotCollection* wellLogPlotColl = wellLogPlotCollection();
|
RimWellLogPlotCollection* wellLogPlotColl = wellLogPlotCollection();
|
||||||
if (wellLogPlotColl)
|
if (wellLogPlotColl)
|
||||||
{
|
{
|
||||||
wellLogPlotColl->addWellLogPlot();
|
RimWellLogPlot* plot = new RimWellLogPlot();
|
||||||
|
RimWellLogPlotTrace* plotrace = new RimWellLogPlotTrace();
|
||||||
|
|
||||||
|
plot->addTrace(plotrace);
|
||||||
|
wellLogPlotColl->wellLogPlots().push_back(plot);
|
||||||
|
|
||||||
|
RiaApplication::instance()->project()->updateConnectedEditors();
|
||||||
|
RiuMainWindow::instance()->setCurrentObjectInTreeView(plot);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,11 +20,6 @@
|
|||||||
#include "RimWellLogPlotCollection.h"
|
#include "RimWellLogPlotCollection.h"
|
||||||
|
|
||||||
#include "RimWellLogPlot.h"
|
#include "RimWellLogPlot.h"
|
||||||
#include "RimProject.h"
|
|
||||||
|
|
||||||
#include "RiuMainWindow.h"
|
|
||||||
|
|
||||||
#include "RiaApplication.h"
|
|
||||||
|
|
||||||
#include "cafPdmUiTreeView.h"
|
#include "cafPdmUiTreeView.h"
|
||||||
|
|
||||||
@ -48,15 +43,3 @@ RimWellLogPlotCollection::~RimWellLogPlotCollection()
|
|||||||
{
|
{
|
||||||
wellLogPlots.deleteAllChildObjects();
|
wellLogPlots.deleteAllChildObjects();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
///
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
void RimWellLogPlotCollection::addWellLogPlot()
|
|
||||||
{
|
|
||||||
RimWellLogPlot* plot = new RimWellLogPlot();
|
|
||||||
wellLogPlots.push_back(plot);
|
|
||||||
|
|
||||||
RiaApplication::instance()->project()->updateConnectedEditors();
|
|
||||||
RiuMainWindow::instance()->setCurrentObjectInTreeView(plot);
|
|
||||||
}
|
|
||||||
|
@ -38,9 +38,4 @@ public:
|
|||||||
virtual ~RimWellLogPlotCollection();
|
virtual ~RimWellLogPlotCollection();
|
||||||
|
|
||||||
caf::PdmChildArrayField<RimWellLogPlot*> wellLogPlots;
|
caf::PdmChildArrayField<RimWellLogPlot*> wellLogPlots;
|
||||||
|
|
||||||
void addWellLogPlot();
|
|
||||||
|
|
||||||
private:
|
|
||||||
caf::PdmField<bool> show;
|
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user