MCPcopy Create free account
hub / github.com/audacity/audacity / DoIdle

Method DoIdle

src/AdornedRulerPanel.cpp:1500–1523  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1498}
1499
1500void 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
1525void AdornedRulerPanel::OnAudioStartStop(AudioIOEvent evt)
1526{

Callers

nothing calls this directly

Calls 3

GetFunction · 0.85
IsIconizedMethod · 0.80
GetZoomMethod · 0.80

Tested by

no test coverage detected