Fix crashes in Drag and Drop if the drop target is the same as the current dragged item

This commit is contained in:
Gaute Lindkvist
2020-07-03 14:49:59 +02:00
parent da6360cf98
commit a9c9471e7f
3 changed files with 18 additions and 6 deletions

View File

@@ -444,6 +444,9 @@ void RimSummaryCurveCollection::moveCurvesToCollection( RimSummaryCurveCollectio
for ( auto curve : curves )
{
RimSummaryCurveCollection* srcCollection = nullptr;
if ( curve == curveToInsertBeforeOrAfter ) continue;
curve->firstAncestorOrThisOfTypeAsserted( srcCollection );
srcCollection->removeCurve( curve );