| 1724 | |
| 1725 | #ifdef QUICK_PLAY_HANDLE |
| 1726 | auto AdornedRulerPanel::QPHandle::Click( |
| 1727 | const TrackPanelMouseEvent &event, AudacityProject *pProject) -> Result |
| 1728 | { |
| 1729 | auto result = CommonRulerHandle::Click(event, pProject); |
| 1730 | if (!( result & RefreshCode::Cancelled )) { |
| 1731 | if (mClicked == Button::Left) { |
| 1732 | if (!mParent) |
| 1733 | return RefreshCode::Cancelled; |
| 1734 | |
| 1735 | auto &scrubber = Scrubber::Get( *pProject ); |
| 1736 | if(scrubber.HasMark()) { |
| 1737 | // We can't stop scrubbing yet (see comments in Bug 1391), |
| 1738 | // but we can pause it. |
| 1739 | ProjectAudioManager::Get( *pProject ).OnPause(); |
| 1740 | } |
| 1741 | |
| 1742 | // Store the initial play region state |
| 1743 | const auto &viewInfo = ViewInfo::Get( *pProject ); |
| 1744 | const auto &playRegion = viewInfo.playRegion; |
| 1745 | mParent->mOldPlayRegion = playRegion; |
| 1746 | |
| 1747 | // Save old selection, in case drag of selection is cancelled |
| 1748 | mOldSelection = ViewInfo::Get( *pProject ).selectedRegion; |
| 1749 | |
| 1750 | mParent->HandleQPClick( event.event, mX ); |
| 1751 | mParent->HandleQPDrag( event.event, mX ); |
| 1752 | } |
| 1753 | } |
| 1754 | |
| 1755 | return result; |
| 1756 | } |
| 1757 | |
| 1758 | void AdornedRulerPanel::HandleQPClick(wxMouseEvent &evt, wxCoord mousePosX) |
| 1759 | { |
nothing calls this directly
no test coverage detected