summaryrefslogtreecommitdiffstats
path: root/desktop-widgets
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2021-01-19 09:54:39 +0100
committerGravatar bstoeger <32835590+bstoeger@users.noreply.github.com>2021-01-20 08:47:18 +0100
commitff536e98fc3e88c3c4fd769229cf901a9f272be0 (patch)
tree26273be759d7b1536978cabea55bc5ae06b86c2c /desktop-widgets
parente32e6d63a7c158a03a851492f4f9d3edffe2f857 (diff)
downloadsubsurface-ff536e98fc3e88c3c4fd769229cf901a9f272be0.tar.gz
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 <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets')
-rw-r--r--desktop-widgets/statswidget.cpp4
1 files changed, 3 insertions, 1 deletions
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)