diff --git a/ApplicationLibCode/UserInterface/RiuMultiPlotPage.cpp b/ApplicationLibCode/UserInterface/RiuMultiPlotPage.cpp index 162cde5bf4..b0ee3ef131 100644 --- a/ApplicationLibCode/UserInterface/RiuMultiPlotPage.cpp +++ b/ApplicationLibCode/UserInterface/RiuMultiPlotPage.cpp @@ -600,7 +600,11 @@ void RiuMultiPlotPage::onLegendUpdated() //-------------------------------------------------------------------------------------------------- void RiuMultiPlotPage::refreshLegends() { - // TODO - might need to do something here, but at the moment it looks like alignCanvasTops() is sufficient + QList> legends = this->legendsForVisiblePlots(); + for ( const auto& l : legends ) + { + l->setVisible( !l->isEmpty() ); + } } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/UserInterface/RiuQwtPlotLegend.cpp b/ApplicationLibCode/UserInterface/RiuQwtPlotLegend.cpp index 438e8a81e4..c98fd6caf9 100644 --- a/ApplicationLibCode/UserInterface/RiuQwtPlotLegend.cpp +++ b/ApplicationLibCode/UserInterface/RiuQwtPlotLegend.cpp @@ -108,7 +108,6 @@ QSize RiuQwtPlotLegend::sizeHint() const void RiuQwtPlotLegend::updateLegend( const QVariant& variant, const QList& legendItems ) { QwtLegend::updateLegend( variant, legendItems ); - setVisible( !legendItems.empty() ); emit legendUpdated(); }