mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Add support for dropping folders in summary plots and multi summary plots
This commit is contained in:
@@ -217,7 +217,20 @@ void RimSummaryMultiPlot::handleDroppedObjects( const std::vector<caf::PdmObject
|
||||
if ( address ) addresses.push_back( address );
|
||||
|
||||
auto adrColl = dynamic_cast<RimSummaryAddressCollection*>( o );
|
||||
if ( adrColl ) addressCollections.push_back( adrColl );
|
||||
if ( adrColl )
|
||||
{
|
||||
if ( objects.size() == 1 )
|
||||
{
|
||||
if ( adrColl->isFolder() )
|
||||
{
|
||||
// If a folder is selected, return all sub items in folder
|
||||
auto childObjects = adrColl->subFolders();
|
||||
addressCollections.insert( addressCollections.end(), childObjects.begin(), childObjects.end() );
|
||||
}
|
||||
}
|
||||
else
|
||||
addressCollections.push_back( adrColl );
|
||||
}
|
||||
|
||||
auto summaryCase = dynamic_cast<RimSummaryCase*>( o );
|
||||
if ( summaryCase ) cases.push_back( summaryCase );
|
||||
|
||||
Reference in New Issue
Block a user