| 2139 | } |
| 2140 | |
| 2141 | void MainWindow::applyDots(PlotWidget* plot) { |
| 2142 | if (plot == nullptr) { |
| 2143 | return; |
| 2144 | } |
| 2145 | // The Dots toggle flips the plot-level style between Lines and Lines+Dots, |
| 2146 | // leaving other styles (Dots, Sticks, Steps) chosen in the Curve Style panel |
| 2147 | // alone. setDefaultStyle restyles every curve and is inherited by new ones. |
| 2148 | const auto from = dots_ ? PlotWidgetBase::kLines : PlotWidgetBase::kLinesAndDots; |
| 2149 | const auto to = dots_ ? PlotWidgetBase::kLinesAndDots : PlotWidgetBase::kLines; |
| 2150 | if (plot->defaultCurveStyle() == from) { |
| 2151 | plot->setDefaultStyle(to); |
| 2152 | } |
| 2153 | } |
| 2154 | |
| 2155 | void MainWindow::onPlotZoomChanged(PlotWidget* modified, QRectF rect) { |
| 2156 | if (!button_link_->isChecked()) { |
nothing calls this directly
no test coverage detected