1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-02-16 15:57:52 +01:00

TrackPanelCell hit tests can return multiple results...

.. though only the first is used yet
This commit is contained in:
Paul Licameli
2017-06-29 10:34:57 -04:00
parent b3d62e2ab6
commit 8e44827980
32 changed files with 165 additions and 93 deletions

View File

@@ -21,15 +21,16 @@ TrackPanelResizerCell::TrackPanelResizerCell( std::shared_ptr<Track> pTrack )
: mpTrack{ pTrack }
{}
UIHandlePtr TrackPanelResizerCell::HitTest
std::vector<UIHandlePtr> TrackPanelResizerCell::HitTest
(const TrackPanelMouseState &st, const AudacityProject *pProject)
{
std::vector<UIHandlePtr> results;
auto pTrack = mpTrack.lock();
if (pTrack) {
auto result = std::make_shared<TrackPanelResizeHandle>(
pTrack, st.state.m_y, pProject );
result = AssignUIHandlePtr(mResizeHandle, result);
return result;
results.push_back(result);
}
return {};
return results;
}