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

Method UpdateViewIfNoTracks

src/TrackPanel.cpp:662–682  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

660}
661
662void TrackPanel::UpdateViewIfNoTracks()
663{
664 if (mTracks->empty())
665 {
666 // BG: There are no more tracks on screen
667 //BG: Set zoom to normal
668 mViewInfo->SetZoom(ZoomInfo::GetDefaultZoom());
669
670 //STM: Set selection to 0,0
671 //PRL: and default the rest of the selection information
672 mViewInfo->selectedRegion = SelectedRegion();
673
674 // PRL: Following causes the time ruler to align 0 with left edge.
675 // Bug 972
676 mViewInfo->hpos = 0;
677
678 Viewport::Get(*GetProject()).HandleResize();
679 //STM: Clear message if all tracks are removed
680 ProjectStatus::Get( *GetProject() ).Set({});
681 }
682}
683
684// The tracks positions within the list have changed, so update the vertical
685// ruler size for the track that triggered the event.

Callers 3

DoRemoveTracksMethod · 0.80
ProcessUIHandleResultMethod · 0.80
OnTrackCloseFunction · 0.80

Calls 7

GetDefaultZoomFunction · 0.85
GetFunction · 0.85
SetZoomMethod · 0.80
SelectedRegionClass · 0.70
emptyMethod · 0.45
HandleResizeMethod · 0.45
SetMethod · 0.45

Tested by

no test coverage detected