mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-17 14:11:13 +01:00
static AdornedRulerPanel::Get()...
... not member functions of AudacityProject
This commit is contained in:
@@ -289,7 +289,7 @@ void OnCut(const CommandContext &context)
|
||||
auto &tracks = TrackList::Get( project );
|
||||
auto &trackPanel = TrackPanel::Get( project );
|
||||
auto &selectedRegion = ViewInfo::Get( project ).selectedRegion;
|
||||
auto ruler = project.GetRulerPanel();
|
||||
auto &ruler = AdornedRulerPanel::Get( project );
|
||||
|
||||
// This doesn't handle cutting labels, it handles
|
||||
// cutting the _text_ inside of labels, i.e. if you're
|
||||
@@ -364,7 +364,7 @@ void OnCut(const CommandContext &context)
|
||||
|
||||
// Bug 1663
|
||||
//mRuler->ClearPlayRegion();
|
||||
ruler->DrawOverlays( true );
|
||||
ruler.DrawOverlays( true );
|
||||
|
||||
project.RedrawProject();
|
||||
}
|
||||
|
||||
@@ -270,7 +270,7 @@ void MoveWhenAudioInactive
|
||||
auto &viewInfo = ViewInfo::Get( project );
|
||||
auto &trackPanel = TrackPanel::Get( project );
|
||||
auto &tracks = TrackList::Get( project );
|
||||
auto ruler = project.GetRulerPanel();
|
||||
auto &ruler = AdornedRulerPanel::Get( project );
|
||||
|
||||
// If TIME_UNIT_SECONDS, snap-to will be off.
|
||||
int snapToTime = project.GetSnapTo();
|
||||
@@ -296,7 +296,7 @@ void MoveWhenAudioInactive
|
||||
|
||||
// Move the visual cursor, avoiding an unnecessary complete redraw
|
||||
trackPanel.DrawOverlays(false);
|
||||
ruler->DrawOverlays(false);
|
||||
ruler.DrawOverlays(false);
|
||||
|
||||
// This updates the selection shown on the selection bar, and the play
|
||||
// region
|
||||
|
||||
@@ -297,7 +297,7 @@ void DoRecord( AudacityProject &project )
|
||||
void DoLockPlayRegion( AudacityProject &project )
|
||||
{
|
||||
auto &tracks = TrackList::Get( project );
|
||||
auto ruler = project.GetRulerPanel();
|
||||
auto &ruler = AdornedRulerPanel::Get( project );
|
||||
|
||||
double start, end;
|
||||
project.GetPlayRegion(&start, &end);
|
||||
@@ -307,16 +307,16 @@ void DoLockPlayRegion( AudacityProject &project )
|
||||
}
|
||||
else {
|
||||
project.SetPlayRegionLocked( true );
|
||||
ruler->Refresh(false);
|
||||
ruler.Refresh(false);
|
||||
}
|
||||
}
|
||||
|
||||
void DoUnlockPlayRegion( AudacityProject &project )
|
||||
{
|
||||
auto ruler = project.GetRulerPanel();
|
||||
auto &ruler = AdornedRulerPanel::Get( project );
|
||||
|
||||
project.SetPlayRegionLocked( false );
|
||||
ruler->Refresh(false);
|
||||
ruler.Refresh(false);
|
||||
}
|
||||
|
||||
void DoTogglePinnedHead( AudacityProject &project )
|
||||
@@ -330,10 +330,9 @@ void DoTogglePinnedHead( AudacityProject &project )
|
||||
if (ctb)
|
||||
ctb->StartScrollingIfPreferred();
|
||||
|
||||
auto ruler = project.GetRulerPanel();
|
||||
if (ruler)
|
||||
// Update button image
|
||||
ruler->UpdateButtonStates();
|
||||
auto &ruler = AdornedRulerPanel::Get( project );
|
||||
// Update button image
|
||||
ruler.UpdateButtonStates();
|
||||
|
||||
auto &scrubber = Scrubber::Get( project );
|
||||
if (scrubber.HasMark())
|
||||
|
||||
Reference in New Issue
Block a user