mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
FIx regression blocking drag and drop of well names into existing plots
This commit is contained in:
parent
15f17234c8
commit
b822996fc3
@ -1970,23 +1970,27 @@ int RimSummaryPlot::handleAddressCollectionDrop( RimSummaryAddressCollection* ad
|
||||
auto curveAdr = newCurveDef.summaryAddress();
|
||||
if ( addressCollection->contentType() == RimSummaryAddressCollection::CollectionContentType::WELL )
|
||||
{
|
||||
auto currentObjectString = curveAdr.wellName();
|
||||
curveAdr.setWellName( droppedName );
|
||||
newCurveDef.setSummaryAddress( curveAdr );
|
||||
newCurveDefsWithObjectNames[newCurveDef].insert( curveAdr.wellName() );
|
||||
newCurveDefsWithObjectNames[newCurveDef].insert( currentObjectString );
|
||||
}
|
||||
else if ( addressCollection->contentType() == RimSummaryAddressCollection::CollectionContentType::WELL_GROUP )
|
||||
{
|
||||
auto currentObjectString = curveAdr.wellGroupName();
|
||||
curveAdr.setWellGroupName( droppedName );
|
||||
newCurveDef.setSummaryAddress( curveAdr );
|
||||
newCurveDefsWithObjectNames[newCurveDef].insert( curveAdr.wellGroupName() );
|
||||
newCurveDefsWithObjectNames[newCurveDef].insert( currentObjectString );
|
||||
}
|
||||
else if ( addressCollection->contentType() == RimSummaryAddressCollection::CollectionContentType::REGION )
|
||||
{
|
||||
auto currentObjectString = std::to_string( curveAdr.regionNumber() );
|
||||
|
||||
int droppedRegion = std::stoi( droppedName );
|
||||
|
||||
curveAdr.setRegion( droppedRegion );
|
||||
newCurveDef.setSummaryAddress( curveAdr );
|
||||
newCurveDefsWithObjectNames[newCurveDef].insert( std::to_string( curveAdr.regionNumber() ) );
|
||||
newCurveDefsWithObjectNames[newCurveDef].insert( currentObjectString );
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user