Add support for dropping folders in summary plots and multi summary plots

This commit is contained in:
jonjenssen
2022-05-25 21:48:01 +02:00
committed by jonjenssen
parent 53af120f39
commit ff57252812
3 changed files with 32 additions and 6 deletions

View File

@@ -2124,10 +2124,23 @@ void RimSummaryPlot::handleDroppedObjects( const std::vector<caf::PdmObjectHandl
auto addressCollection = dynamic_cast<RimSummaryAddressCollection*>( obj );
if ( addressCollection )
{
auto [curveCount, curvesCreated] = handleAddressCollectionDrop( addressCollection );
accumulatedCurveCount += curveCount;
curvesToUpdate.insert( curvesToUpdate.end(), curvesCreated.begin(), curvesCreated.end() );
continue;
if ( addressCollection->isFolder() )
{
for ( auto coll : addressCollection->subFolders() )
{
auto [curveCount, curvesCreated] = handleAddressCollectionDrop( coll );
accumulatedCurveCount += curveCount;
curvesToUpdate.insert( curvesToUpdate.end(), curvesCreated.begin(), curvesCreated.end() );
}
continue;
}
else
{
auto [curveCount, curvesCreated] = handleAddressCollectionDrop( addressCollection );
accumulatedCurveCount += curveCount;
curvesToUpdate.insert( curvesToUpdate.end(), curvesCreated.begin(), curvesCreated.end() );
continue;
}
}
}