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

Method Click

src/AdornedRulerPanel.cpp:1726–1756  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1724
1725#ifdef QUICK_PLAY_HANDLE
1726auto 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
1758void AdornedRulerPanel::HandleQPClick(wxMouseEvent &evt, wxCoord mousePosX)
1759{

Callers

nothing calls this directly

Calls 4

GetFunction · 0.85
HandleQPClickMethod · 0.80
HandleQPDragMethod · 0.80
OnPauseMethod · 0.45

Tested by

no test coverage detected