New feature: delete unchecked subitems (#9010)

* New feature: delete unchecked subitems
This commit is contained in:
jonjenssen
2022-06-02 06:50:14 +02:00
committed by GitHub
parent cbe731d187
commit 41904df681
10 changed files with 245 additions and 59 deletions

View File

@@ -64,6 +64,14 @@ void RimWellPathFractureCollection::addFracture( RimWellPathFracture* fracture )
m_fractures.push_back( fracture );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellPathFractureCollection::removeFracture( RimWellPathFracture* fracture )
{
m_fractures.removeChild( fracture );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@@ -43,6 +43,7 @@ public:
bool hasFractures() const;
void addFracture( RimWellPathFracture* fracture );
void removeFracture( RimWellPathFracture* fracture );
void deleteFractures();
std::vector<RimWellPathFracture*> allFractures() const;

View File

@@ -1305,6 +1305,7 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection()
if ( caf::CmdFeatureManager::instance()->getCommandFeature( "RicDeleteSubItemsFeature" )->canFeatureBeExecuted() )
{
menuBuilder << "Separator";
menuBuilder << "RicDeleteUncheckedSubItemsFeature";
menuBuilder << "RicDeleteSubItemsFeature";
}

View File

@@ -83,6 +83,15 @@ void RimSummaryMultiPlotCollection::addSummaryMultiPlot( RimSummaryMultiPlot* pl
plot->duplicatePlot.connect( this, &RimSummaryMultiPlotCollection::onDuplicatePlot );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSummaryMultiPlotCollection::removePlotNoUpdate( RimSummaryMultiPlot* plot )
{
if ( plot == nullptr ) return;
m_summaryMultiPlots().removeChild( plot );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@@ -48,6 +48,7 @@ public:
void addSummaryMultiPlot( RimSummaryMultiPlot* plot );
void summaryPlotItemInfos( QList<caf::PdmOptionItemInfo>* optionInfos ) const;
void duplicatePlot( RimSummaryMultiPlot* plotToDuplicate );
void removePlotNoUpdate( RimSummaryMultiPlot* plotToRemove );
void updateSummaryNameHasChanged();