mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#467) Implemented tree view drag & drop of LAS file well log channels to plot tracks
Did some refactoring/cleanup of existing drag & drop code to make it easier to add drag & drop for other item types.
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
#include "RimWellLogFileCurve.h"
|
||||
#include "RimWellLogPlotTrack.h"
|
||||
#include "RimWellLogFile.h"
|
||||
#include "RimWellLogFileChannel.h"
|
||||
#include "RimWellPath.h"
|
||||
#include "RimWellPathCollection.h"
|
||||
#include "RimProject.h"
|
||||
@@ -157,3 +158,24 @@ RimWellLogFileCurve* RicNewWellLogFileCurveFeature::addCurve(RimWellLogPlotTrack
|
||||
|
||||
return curve;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicNewWellLogFileCurveFeature::addWellLogChannelsToPlotTrack(RimWellLogPlotTrack* plotTrack, const std::vector<RimWellLogFileChannel*>& wellLogFileChannels)
|
||||
{
|
||||
for (size_t cIdx = 0; cIdx < wellLogFileChannels.size(); cIdx++)
|
||||
{
|
||||
RimWellLogFileCurve* plotCurve = addCurve(plotTrack);
|
||||
|
||||
RimWellPath* wellPath;
|
||||
wellLogFileChannels[cIdx]->firstAnchestorOrThisOfType(wellPath);
|
||||
if (wellPath)
|
||||
{
|
||||
plotCurve->setWellPath(wellPath);
|
||||
plotCurve->setWellLogChannelName(wellLogFileChannels[cIdx]->name());
|
||||
plotCurve->updatePlotData();
|
||||
plotCurve->updateConnectedEditors();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user