| 1270 | } |
| 1271 | |
| 1272 | void Timeline::setViewportLeftDisplayNs(qint64 display_ns) { |
| 1273 | if (view_ == nullptr || view_->horizontalScrollBar() == nullptr) { |
| 1274 | return; |
| 1275 | } |
| 1276 | // QScrollBar::setValue clamps to [min,max], so an out-of-range position (e.g. |
| 1277 | // a wider window than at save time) lands at the nearest reachable edge. |
| 1278 | const double scene_x = TimelineScene::nsToPx(display_ns, viewport_); |
| 1279 | view_->horizontalScrollBar()->setValue(static_cast<int>(std::llround(scene_x))); |
| 1280 | } |
| 1281 | |
| 1282 | int Timeline::nameColumnWidth() const { |
| 1283 | if (name_splitter_ == nullptr) { |