Fix crashes when dropping analysis plots into Multiplots

This commit is contained in:
Gaute Lindkvist
2020-09-16 19:33:44 +02:00
committed by Magne Sjaastad
parent ab3e43d8fb
commit 93baf776a1
50 changed files with 360 additions and 255 deletions

View File

@@ -1,6 +1,8 @@
#include "RimPlot.h"
#include "RicfCommandObject.h"
#include "RimAbstractPlotCollection.h"
#include "RimMultiPlot.h"
#include "RimPlotCurve.h"
#include "RimPlotWindow.h"
@@ -124,7 +126,13 @@ void RimPlot::removeFromMdiAreaAndCollection()
{
revokeMdiWindowStatus();
}
doRemoveFromCollection();
RimAbstractPlotCollection* plotCollection = nullptr;
this->firstAncestorOfType( plotCollection );
if ( plotCollection )
{
plotCollection->removeRimPlot( this );
}
}
//--------------------------------------------------------------------------------------------------