mirror of
https://github.com/cookiengineer/audacity
synced 2026-02-08 04:32:00 +01:00
Play region and its lock are stored together in ViewInfo
This commit is contained in:
@@ -1590,8 +1590,9 @@ void ProjectWindow::TP_DisplaySelection()
|
||||
auto &viewInfo = ViewInfo::Get( project );
|
||||
const auto &selectedRegion = viewInfo.selectedRegion;
|
||||
double audioTime;
|
||||
auto &playRegion = ViewInfo::Get( project ).playRegion;
|
||||
|
||||
if (!gAudioIO->IsBusy() && project.IsPlayRegionLocked())
|
||||
if (!gAudioIO->IsBusy() && playRegion.Locked())
|
||||
ruler.SetPlayRegion( selectedRegion.t0(), selectedRegion.t1() );
|
||||
else
|
||||
// Cause ruler redraw anyway, because we may be zooming or scrolling
|
||||
@@ -1599,10 +1600,8 @@ void ProjectWindow::TP_DisplaySelection()
|
||||
|
||||
if (gAudioIO->IsBusy())
|
||||
audioTime = gAudioIO->GetStreamTime();
|
||||
else {
|
||||
double playEnd;
|
||||
project.GetPlayRegion(&audioTime, &playEnd);
|
||||
}
|
||||
else
|
||||
audioTime = playRegion.GetStart();
|
||||
|
||||
SelectionBar::Get( project ).SetTimes(selectedRegion.t0(),
|
||||
selectedRegion.t1(), audioTime);
|
||||
|
||||
Reference in New Issue
Block a user