#5171 Fix legend updates by getting rid of the show/hideEvent crash fix

* The crash is instead fixed by getting rid of deleteLater()
This commit is contained in:
Gaute Lindkvist
2019-12-04 09:13:54 +01:00
parent b5712987de
commit cd5b432267
10 changed files with 46 additions and 27 deletions

View File

@@ -160,7 +160,8 @@ void RiuGridCrossQwtPlot::removeDataSetLegend( RimGridCrossPlotDataSet* dataSetT
if ( it->second != nullptr )
{
it->second->hide();
it->second->deleteLater();
it->second->setParent( nullptr );
delete it->second;
}
m_legendWidgets.erase( it );
@@ -181,7 +182,8 @@ void RiuGridCrossQwtPlot::removeDanglingDataSetLegends()
if ( it->second != nullptr )
{
it->second->hide();
it->second->deleteLater();
it->second->setParent( nullptr );
delete it->second;
}
m_legendWidgets.erase( it++ );
}