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 "RimMainPlotCollection.h"
|
||||
#include "RimWellLogPlotCollection.h"
|
||||
#include "RimWellLogPlot.h"
|
||||
#include "RimWellLogPlotTrace.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiuMainWindow.h"
|
||||
|
||||
#include <QAction>
|
||||
|
||||
@ -46,7 +49,14 @@ void RicNewWellLogPlotFeature::onActionTriggered(bool isChecked)
|
||||
RimWellLogPlotCollection* wellLogPlotColl = wellLogPlotCollection();
|
||||
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 "RimWellLogPlot.h"
|
||||
#include "RimProject.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
|
||||
#include "cafPdmUiTreeView.h"
|
||||
|
||||
@ -48,15 +43,3 @@ RimWellLogPlotCollection::~RimWellLogPlotCollection()
|
||||
{
|
||||
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();
|
||||
|
||||
caf::PdmChildArrayField<RimWellLogPlot*> wellLogPlots;
|
||||
|
||||
void addWellLogPlot();
|
||||
|
||||
private:
|
||||
caf::PdmField<bool> show;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user