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

Method CommitChanges

src/tracks/ui/TrackButtonHandles.cpp:38–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38UIHandle::Result MinimizeButtonHandle::CommitChanges
39(const wxMouseEvent &, AudacityProject *pProject, wxWindow*)
40{
41 using namespace RefreshCode;
42
43 if (auto pTrack = mpTrack.lock()) {
44 auto channels = pTrack->Channels();
45 bool wasMinimized = ChannelView::Get(**channels.begin()).GetMinimized();
46 for (auto pChannel : channels)
47 ChannelView::Get(*pChannel).SetMinimized( !wasMinimized );
48 ProjectHistory::Get(*pProject).ModifyState(true);
49
50 // Redraw all tracks when any one of them expands or contracts
51 // (Could we invent a return code that draws only those at or below
52 // the affected track?)
53 return RefreshAll | FixScrollbars;
54 }
55
56 return RefreshNone;
57}
58
59TranslatableString MinimizeButtonHandle::Tip(
60 const wxMouseState &, AudacityProject &) const

Callers

nothing calls this directly

Calls 11

GetFunction · 0.85
ChannelsMethod · 0.80
StopIfPausedMethod · 0.80
OnTrackMenuMethod · 0.80
lockMethod · 0.45
beginMethod · 0.45
SetMinimizedMethod · 0.45
ModifyStateMethod · 0.45
IsAudioActiveMethod · 0.45
FindTrackMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected