! * Remove markerpoint from a curve * @param curve */
| 387 | * @param curve |
| 388 | */ |
| 389 | void InfoElement::removeCurve(const XYCurve* curve) { |
| 390 | for (const auto& mp : markerpoints) { |
| 391 | if (mp.curve == curve) { |
| 392 | disconnect(curve, nullptr, this, nullptr); |
| 393 | setUndoAware(false); |
| 394 | removeChild(mp.customPoint); |
| 395 | setUndoAware(true); |
| 396 | } |
| 397 | } |
| 398 | |
| 399 | setUndoAware(false); |
| 400 | if (curve->name() == connectionLineCurveName()) |
| 401 | setConnectionLineNextValidCurve(); |
| 402 | setUndoAware(true); |
| 403 | |
| 404 | m_title->setUndoAware(false); |
| 405 | m_title->setText(createTextLabelText()); |
| 406 | |
| 407 | // hide the label if now curves are selected |
| 408 | if (markerpoints.isEmpty()) { |
| 409 | m_title->setVisible(false); // hide in the worksheet view |
| 410 | Q_D(InfoElement); |
| 411 | d->update(); // redraw to remove all children graphic items belonging to InfoElement |
| 412 | } |
| 413 | |
| 414 | m_title->setUndoAware(true); |
| 415 | } |
| 416 | |
| 417 | /*! |
| 418 | * Set the z value of the m_title and the custompoints higher than the infoelement |
no test coverage detected