| 213 | } |
| 214 | |
| 215 | void XYSmoothCurveDock::xDataColumnChanged(const QModelIndex& index) { |
| 216 | CONDITIONAL_LOCK_RETURN; |
| 217 | |
| 218 | auto* column = static_cast<AbstractColumn*>(index.internalPointer()); |
| 219 | for (auto* curve : m_curvesList) |
| 220 | static_cast<XYSmoothCurve*>(curve)->setXDataColumn(column); |
| 221 | |
| 222 | // disable types that need more data points |
| 223 | if (column) { |
| 224 | if (uiGeneralTab.cbAutoRange->isChecked()) { |
| 225 | const auto numberLocale = QLocale(); |
| 226 | uiGeneralTab.leMin->setText(numberLocale.toString(column->minimum())); |
| 227 | uiGeneralTab.leMax->setText(numberLocale.toString(column->maximum())); |
| 228 | } |
| 229 | |
| 230 | updateSettings(column); |
| 231 | } |
| 232 | |
| 233 | enableRecalculate(); |
| 234 | } |
| 235 | |
| 236 | void XYSmoothCurveDock::updateSettings(const AbstractColumn* column) { |
| 237 | if (!column) |
nothing calls this directly
no test coverage detected