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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user