mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fix crash when dragging plot from one multiplot to another
This commit is contained in:
@@ -195,7 +195,16 @@ void RimMultiPlotWindow::movePlotsToThis( const std::vector<RimPlot*>& plotsToMo
|
||||
{
|
||||
for ( size_t tIdx = 0; tIdx < plotsToMove.size(); tIdx++ )
|
||||
{
|
||||
plotsToMove[tIdx]->removeFromMdiAreaAndCollection();
|
||||
RimMultiPlotWindow* previousMultiPlotWindow = nullptr;
|
||||
plotsToMove[tIdx]->firstAncestorOrThisOfType( previousMultiPlotWindow );
|
||||
if ( previousMultiPlotWindow )
|
||||
{
|
||||
previousMultiPlotWindow->removePlot( plotsToMove[tIdx] );
|
||||
}
|
||||
else
|
||||
{
|
||||
plotsToMove[tIdx]->removeFromMdiAreaAndCollection();
|
||||
}
|
||||
}
|
||||
|
||||
size_t insertionStartIndex = 0;
|
||||
|
||||
Reference in New Issue
Block a user