From ff536e98fc3e88c3c4fd769229cf901a9f272be0 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Tue, 19 Jan 2021 09:54:39 +0100 Subject: statistics: don't replot chart when changing features Up to now, when the user changed the visibility of chart features (legend, quartiles, labels, etc.) the whole chart was replot. Instead, only change the visibility status of these items. After all, this modularity is one of the things the conversion to QSG was all about. Signed-off-by: Berthold Stoeger --- desktop-widgets/statswidget.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'desktop-widgets') diff --git a/desktop-widgets/statswidget.cpp b/desktop-widgets/statswidget.cpp index e0090395f..33174778d 100644 --- a/desktop-widgets/statswidget.cpp +++ b/desktop-widgets/statswidget.cpp @@ -185,7 +185,9 @@ void StatsWidget::var2OperationChanged(int idx) void StatsWidget::featureChanged(int idx, bool status) { state.featureChanged(idx, status); - updateUi(); + // No need for a full chart replot - just show/hide the features + if (view) + view->updateFeatures(state); } void StatsWidget::showEvent(QShowEvent *e) -- cgit v1.2.3-70-g09d2