mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#499) Added a custom track delete feature
Added infrastructure needed to delete track from plot and plot collection
This commit is contained in:
@@ -822,7 +822,7 @@ void RimProject::actionsBasedOnSelection(QMenu& contextMenu)
|
||||
{
|
||||
commandIds << "RicNewWellLogCurveExtractionFeature";
|
||||
commandIds << "RicNewWellLogFileCurveFeature";
|
||||
commandIds << "RicDeleteItemFeature";
|
||||
commandIds << "RicDeleteWellLogPlotTrackFeature";
|
||||
}
|
||||
else if (dynamic_cast<RimWellLogPlotCurve*>(uiItem))
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -54,6 +54,7 @@ public:
|
||||
|
||||
void addTrack(RimWellLogPlotTrack* track);
|
||||
size_t trackCount() { return tracks.size();}
|
||||
void removeTrack(RimWellLogPlotTrack* track);
|
||||
|
||||
void loadDataAndUpdate();
|
||||
void updateTracks();
|
||||
|
||||
Reference in New Issue
Block a user