mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-28 14:18:41 +02:00
Fix cursor changes for selection
This commit is contained in:
parent
c4995efed8
commit
4925d0a54b
@ -439,12 +439,12 @@ SelectHandle::SelectHandle
|
|||||||
, mSnapManager{ std::make_shared<SnapManager>(&trackList, &viewInfo) }
|
, mSnapManager{ std::make_shared<SnapManager>(&trackList, &viewInfo) }
|
||||||
{
|
{
|
||||||
const wxMouseState &state = st.state;
|
const wxMouseState &state = st.state;
|
||||||
const wxRect &rect = st.rect;
|
mRect = st.rect;
|
||||||
|
|
||||||
auto time = std::max(0.0, viewInfo.PositionToTime(state.m_x, rect.x));
|
auto time = std::max(0.0, viewInfo.PositionToTime(state.m_x, mRect.x));
|
||||||
mSnapStart = mSnapManager->Snap(pTrack.get(), time, false);
|
mSnapStart = mSnapManager->Snap(pTrack.get(), time, false);
|
||||||
if (mSnapStart.snappedPoint)
|
if (mSnapStart.snappedPoint)
|
||||||
mSnapStart.outCoord += rect.x;
|
mSnapStart.outCoord += mRect.x;
|
||||||
else
|
else
|
||||||
mSnapStart.outCoord = -1;
|
mSnapStart.outCoord = -1;
|
||||||
|
|
||||||
@ -579,7 +579,6 @@ UIHandle::Result SelectHandle::Click
|
|||||||
else if (!event.LeftDown())
|
else if (!event.LeftDown())
|
||||||
return Cancelled;
|
return Cancelled;
|
||||||
|
|
||||||
mRect = evt.rect;
|
|
||||||
mInitialSelection = viewInfo.selectedRegion;
|
mInitialSelection = viewInfo.selectedRegion;
|
||||||
|
|
||||||
TrackList *const trackList = pProject->GetTracks();
|
TrackList *const trackList = pProject->GetTracks();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user