| 508 | } |
| 509 | |
| 510 | void Worksheet::deleteAspectFromGraphicsItem(const QGraphicsItem* item) { |
| 511 | Q_ASSERT(item); |
| 512 | // determine the corresponding aspect |
| 513 | AbstractAspect* aspect(nullptr); |
| 514 | for (const auto* child : children<WorksheetElement>(ChildIndexFlag::IncludeHidden)) { |
| 515 | aspect = this->aspectFromGraphicsItem(child, item); |
| 516 | if (aspect) |
| 517 | break; |
| 518 | } |
| 519 | |
| 520 | if (!aspect) |
| 521 | return; |
| 522 | |
| 523 | if (aspect->parentAspect()) |
| 524 | aspect->parentAspect()->removeChild(aspect); |
| 525 | else |
| 526 | this->removeChild(aspect); |
| 527 | } |
| 528 | |
| 529 | void Worksheet::setIsClosing() { |
| 530 | if (m_view) |
no test coverage detected