| 253 | } |
| 254 | |
| 255 | void Datapicker::handleAspectAboutToBeRemoved(const AbstractAspect* aspect) { |
| 256 | const auto* curve = qobject_cast<const DatapickerCurve*>(aspect); |
| 257 | if (curve) { |
| 258 | // clear scene |
| 259 | const auto& points = curve->children<DatapickerPoint>(ChildIndexFlag::IncludeHidden); |
| 260 | for (auto* point : points) |
| 261 | handleChildAspectAboutToBeRemoved(point); |
| 262 | |
| 263 | if (curve == m_activeCurve) { |
| 264 | m_activeCurve = nullptr; |
| 265 | Q_EMIT statusInfo(QString()); |
| 266 | } |
| 267 | } else |
| 268 | handleChildAspectAboutToBeRemoved(aspect); |
| 269 | |
| 270 | Q_EMIT requestUpdateActions(); |
| 271 | } |
| 272 | |
| 273 | void Datapicker::handleAspectAdded(const AbstractAspect* aspect) { |
| 274 | const auto* addedPoint = qobject_cast<const DatapickerPoint*>(aspect); |