| 36 | } |
| 37 | |
| 38 | UIHandle::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 | |
| 59 | TranslatableString MinimizeButtonHandle::Tip( |
| 60 | const wxMouseState &, AudacityProject &) const |
nothing calls this directly
no test coverage detected