MultiPlot: Fix small empty legend when toggling legend position.

This commit is contained in:
Kristian Bendiksen authored and Magne Sjaastad committed 2022-09-15 08:19:41 +02:00
1 parent 711a9b83e7
commit d7b29589a2
2 files changed
+12

No files matched your search

@@ -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();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -123,6 +123,7 @@ protected:
virtual void reinsertPlotWidgets();
virtual void refreshLegends();
void updatePlotLayouts();
void addLegendWidget( RiuPlotWidget* plotWidget,
RiuQwtPlotLegend* legend,