| 97 | } |
| 98 | |
| 99 | bool PlotFocusOverlay::eventFilter(QObject* watched, QEvent* event) { |
| 100 | if (watched == container_) { |
| 101 | const QEvent::Type type = event->type(); |
| 102 | if (type == QEvent::Resize || type == QEvent::LayoutRequest) { |
| 103 | syncGeometryToContainer(); |
| 104 | } else if (type == QEvent::ChildAdded || type == QEvent::ChildPolished) { |
| 105 | // ADS may add new top-level QSplitters as direct siblings, which |
| 106 | // would otherwise stack above us. Bounce back to the top. |
| 107 | raise(); |
| 108 | update(); |
| 109 | } |
| 110 | } |
| 111 | return QWidget::eventFilter(watched, event); |
| 112 | } |
| 113 | |
| 114 | void PlotFocusOverlay::syncGeometryToContainer() { |
| 115 | setGeometry(container_->rect()); |
nothing calls this directly
no test coverage detected