(#499) Added a custom track delete feature

Added infrastructure needed to delete track from plot and plot
collection
This commit is contained in:
Magne Sjaastad
2015-09-21 15:55:55 +02:00
parent 4d42fd37f5
commit 2b7d7be3f1
9 changed files with 150 additions and 15 deletions

View File

@@ -822,7 +822,7 @@ void RimProject::actionsBasedOnSelection(QMenu& contextMenu)
{
commandIds << "RicNewWellLogCurveExtractionFeature";
commandIds << "RicNewWellLogFileCurveFeature";
commandIds << "RicDeleteItemFeature";
commandIds << "RicDeleteWellLogPlotTrackFeature";
}
else if (dynamic_cast<RimWellLogPlotCurve*>(uiItem))
{

View File

@@ -175,6 +175,18 @@ void RimWellLogPlot::addTrack(RimWellLogPlotTrack* track)
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellLogPlot::removeTrack(RimWellLogPlotTrack* track)
{
if (track)
{
m_viewer->removeTrackPlot(track->viewer());
tracks.removeChildObject(track);
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -457,3 +469,4 @@ QString RimWellLogPlot::depthPlotTitle() const
depthTitle += " [m]";
return depthTitle;
}

View File

@@ -54,6 +54,7 @@ public:
void addTrack(RimWellLogPlotTrack* track);
size_t trackCount() { return tracks.size();}
void removeTrack(RimWellLogPlotTrack* track);
void loadDataAndUpdate();
void updateTracks();