| 1950 | } |
| 1951 | |
| 1952 | auto 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 | |
| 1978 | void AdornedRulerPanel::HandleQPRelease(wxMouseEvent &evt) |
| 1979 | { |
no test coverage detected