diff --git a/src/ui/linechart/LinechartWidget.cc b/src/ui/linechart/LinechartWidget.cc index f4badd7a5ef8c119febab369730aef7ee7813dc7..c8652ddecc140387dd45b12590636ab541b0ba98 100644 --- a/src/ui/linechart/LinechartWidget.cc +++ b/src/ui/linechart/LinechartWidget.cc @@ -712,13 +712,16 @@ void LinechartWidget::setPlotFilterLineEditFocus() void LinechartWidget::filterCurve(const QString &key, bool match) { - colorIcons[key]->setVisible(match); - curveNameLabels[key]->setVisible(match); - (*curveLabels)[key]->setVisible(match); - (*curveMeans)[key]->setVisible(match); - (*curveVariances)[key]->setVisible(match); - curveUnits[key]->setVisible(match); - checkBoxes[key]->setVisible(match); + if (!checkBoxes[key]->isChecked()) + { + colorIcons[key]->setVisible(match); + curveNameLabels[key]->setVisible(match); + (*curveLabels)[key]->setVisible(match); + (*curveMeans)[key]->setVisible(match); + (*curveVariances)[key]->setVisible(match); + curveUnits[key]->setVisible(match); + checkBoxes[key]->setVisible(match); + } } void LinechartWidget::filterCurves(const QString &filter) diff --git a/src/ui/linechart/LinechartWidget.h b/src/ui/linechart/LinechartWidget.h index 12fe58494e44daa554d11541050aa52456d65d86..4c9fb20b625418425ca2c58359a75d868fddf20c 100644 --- a/src/ui/linechart/LinechartWidget.h +++ b/src/ui/linechart/LinechartWidget.h @@ -114,7 +114,7 @@ public slots: private slots: /** Called when the user changes the time scale combobox. */ void timeScaleChanged(int index); - /** @brief Applies action on curve corresponding to key based on the bool match. I used to filter curves */ + /** @brief Toggles visibility of curve based on bool match if corresponding checkbox is not checked */ void filterCurve(const QString &key, bool match); protected: