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

Method Release

src/AdornedRulerPanel.cpp:1952–1976  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1950}
1951
1952auto AdornedRulerPanel::QPHandle::Release(
1953 const TrackPanelMouseEvent &event, AudacityProject *pProject,
1954 wxWindow *pParent)
1955 -> Result
1956{
1957 // Keep a shared pointer to self. Otherwise *this might get deleted
1958 // in HandleQPRelease on Windows! Because there is an event-loop yield
1959 // stopping playback, which caused OnCaptureLost to be called, which caused
1960 // clearing of CellularPanel targets!
1961 auto saveMe = mParent->mQPCell->mHolder.lock();
1962
1963 auto result = CommonRulerHandle::Release(event, pProject, pParent);
1964 if (!( result & RefreshCode::Cancelled )) {
1965 if (mClicked == Button::Left) {
1966 if ( mParent ) {
1967 mParent->HandleQPRelease( event.event );
1968 // Update the hot zones for cursor changes
1969 const auto &viewInfo = ViewInfo::Get( *pProject );
1970 const auto &playRegion = viewInfo.playRegion;
1971 mParent->mOldPlayRegion = playRegion;
1972 }
1973 }
1974 }
1975 return result;
1976}
1977
1978void AdornedRulerPanel::HandleQPRelease(wxMouseEvent &evt)
1979{

Callers 2

MixerTrackClusterMethod · 0.45
ResetDelegateMethod · 0.45

Calls 4

ReleaseFunction · 0.85
GetFunction · 0.85
HandleQPReleaseMethod · 0.80
lockMethod · 0.45

Tested by

no test coverage detected