Commit 095323a9 authored by Lorenz Meier's avatar Lorenz Meier

Merge pull request #413 from thomasgubler/plotfilter

Do not filter/hide line in linechartwidget when checkbox of the line is ...
parents 879e1f6a d2e513c5
...@@ -712,6 +712,8 @@ void LinechartWidget::setPlotFilterLineEditFocus() ...@@ -712,6 +712,8 @@ void LinechartWidget::setPlotFilterLineEditFocus()
void LinechartWidget::filterCurve(const QString &key, bool match) void LinechartWidget::filterCurve(const QString &key, bool match)
{ {
if (!checkBoxes[key]->isChecked())
{
colorIcons[key]->setVisible(match); colorIcons[key]->setVisible(match);
curveNameLabels[key]->setVisible(match); curveNameLabels[key]->setVisible(match);
(*curveLabels)[key]->setVisible(match); (*curveLabels)[key]->setVisible(match);
...@@ -719,6 +721,7 @@ void LinechartWidget::filterCurve(const QString &key, bool match) ...@@ -719,6 +721,7 @@ void LinechartWidget::filterCurve(const QString &key, bool match)
(*curveVariances)[key]->setVisible(match); (*curveVariances)[key]->setVisible(match);
curveUnits[key]->setVisible(match); curveUnits[key]->setVisible(match);
checkBoxes[key]->setVisible(match); checkBoxes[key]->setVisible(match);
}
} }
void LinechartWidget::filterCurves(const QString &filter) void LinechartWidget::filterCurves(const QString &filter)
......
...@@ -114,7 +114,7 @@ public slots: ...@@ -114,7 +114,7 @@ public slots:
private slots: private slots:
/** Called when the user changes the time scale combobox. */ /** Called when the user changes the time scale combobox. */
void timeScaleChanged(int index); 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); void filterCurve(const QString &key, bool match);
protected: protected:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment