Fix regression crash due to legend issue

This commit is contained in:
Gaute Lindkvist 2020-04-24 13:08:11 +02:00
parent 87cea76004
commit 2847c46d64

View File

@ -216,9 +216,9 @@ void RiuMultiPlotPage::removePlot( RiuQwtPlotWidget* plotWidget )
if ( legend )
{
legend->setParent( nullptr );
m_legends.removeAt( plotWidgetIdx );
delete legend;
}
m_legends.removeAt( plotWidgetIdx );
QLabel* subTitle = m_subTitles[plotWidgetIdx];
subTitle->setParent( nullptr );