! * called when one of the children was moved, re-adjusts the Z-values for all children. */
| 379 | * called when one of the children was moved, re-adjusts the Z-values for all children. |
| 380 | */ |
| 381 | void Worksheet::handleAspectMoved() { |
| 382 | qreal zVal = 0; |
| 383 | const auto& children = this->children<WorksheetElement>(ChildIndexFlag::IncludeHidden); |
| 384 | for (auto* child : children) |
| 385 | child->graphicsItem()->setZValue(zVal++); |
| 386 | |
| 387 | Q_D(Worksheet); |
| 388 | if (d->layout != Worksheet::Layout::NoLayout) |
| 389 | d->updateLayout(false); |
| 390 | } |
| 391 | |
| 392 | QGraphicsScene* Worksheet::scene() const { |
| 393 | Q_D(const Worksheet); |
nothing calls this directly
no test coverage detected