| 1498 | } |
| 1499 | |
| 1500 | void AdornedRulerPanel::DoIdle() |
| 1501 | { |
| 1502 | bool changed = UpdateRects(); |
| 1503 | changed = SetPanelSize() || changed; |
| 1504 | |
| 1505 | auto &project = *mProject; |
| 1506 | auto &viewInfo = ViewInfo::Get( project ); |
| 1507 | const bool isIconized = ProjectWindow::Get(project).IsIconized(); |
| 1508 | const auto &selectedRegion = viewInfo.selectedRegion; |
| 1509 | const auto &playRegion = viewInfo.playRegion; |
| 1510 | |
| 1511 | changed = changed |
| 1512 | || mLastDrawnSelectedRegion != selectedRegion |
| 1513 | || mLastDrawnPlayRegion != std::pair{ |
| 1514 | playRegion.GetLastActiveStart(), playRegion.GetLastActiveEnd() } |
| 1515 | || mLastDrawnH != viewInfo.hpos |
| 1516 | || mLastDrawnZoom != viewInfo.GetZoom() |
| 1517 | || mLastPlayRegionActive != viewInfo.playRegion.Active() |
| 1518 | ; |
| 1519 | if (changed && !isIconized) |
| 1520 | // Cause ruler redraw anyway, because we may be zooming or scrolling, |
| 1521 | // showing or hiding the scrub bar, etc. |
| 1522 | Refresh(); |
| 1523 | } |
| 1524 | |
| 1525 | void AdornedRulerPanel::OnAudioStartStop(AudioIOEvent evt) |
| 1526 | { |
nothing calls this directly
no test coverage detected