MultiPlot: Fix small empty legend when toggling legend position.

This commit is contained in:
Kristian Bendiksen 2022-09-14 11:07:50 +02:00 committed by Magne Sjaastad
parent dfbdfaa726
commit 52cee02ffe
2 changed files with 12 additions and 0 deletions

View File

@ -605,6 +605,7 @@ void RiuMultiPlotPage::performUpdate( RiaDefines::MultiPlotPageUpdateType whatTo
reinsertPlotWidgets();
alignCanvasTops();
if ( m_autoAlignAxes ) alignAxes();
updatePlotLayouts();
return;
}
@ -643,6 +644,16 @@ void RiuMultiPlotPage::refreshLegends()
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuMultiPlotPage::updatePlotLayouts()
{
QList<QPointer<RiuPlotWidget>> plotWidgets = this->visiblePlotWidgets();
for ( auto p : plotWidgets )
p->updateLayout();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -123,6 +123,7 @@ protected:
virtual void reinsertPlotWidgets();
virtual void refreshLegends();
void updatePlotLayouts();
void addLegendWidget( RiuPlotWidget* plotWidget,
RiuQwtPlotLegend* legend,