diff --git a/src/legend/qlegend.cpp b/src/legend/qlegend.cpp index 5fab937..2faacd3 100644 --- a/src/legend/qlegend.cpp +++ b/src/legend/qlegend.cpp @@ -407,10 +407,8 @@ void QLegend::hideEvent(QHideEvent *event) */ void QLegend::showEvent(QShowEvent *event) { - if (isAttachedToChart()) { - d_ptr->items()->setVisible(false); + if (isAttachedToChart()) layout()->invalidate(); - } QGraphicsWidget::showEvent(event); //layout activation will show the items }