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:
@@ -49,20 +49,6 @@ bool RicDeleteItemFeature::isCommandEnabled()
|
||||
caf::PdmChildArrayFieldHandle* childArrayFieldHandle = dynamic_cast<caf::PdmChildArrayFieldHandle*>(currentPdmObject->parentField());
|
||||
if (!childArrayFieldHandle) return false;
|
||||
|
||||
if (dynamic_cast<RimWellLogPlotTrack*>(currentPdmObject))
|
||||
{
|
||||
RimWellLogPlotTrack* plotTrack = dynamic_cast<RimWellLogPlotTrack*>(currentPdmObject);
|
||||
RimWellLogPlot* wellLogPlot;
|
||||
plotTrack->firstAnchestorOrThisOfType(wellLogPlot);
|
||||
if (wellLogPlot)
|
||||
{
|
||||
if (wellLogPlot->trackCount() < 2)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user