mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-08 08:01:19 +02:00
Fix windows build, and simplify a little
This commit is contained in:
parent
7eafbf6dd6
commit
dc864f3782
@ -469,7 +469,7 @@ UIHandle::Result TimeShiftHandle::Click
|
|||||||
mRect = rect;
|
mRect = rect;
|
||||||
mMouseClickX = event.m_x;
|
mMouseClickX = event.m_x;
|
||||||
const double selStart = viewInfo.PositionToTime(event.m_x, mRect.x);
|
const double selStart = viewInfo.PositionToTime(event.m_x, mRect.x);
|
||||||
mSnapManager = std::make_unique<SnapManager>(trackList,
|
mSnapManager = std::make_shared<SnapManager>(trackList,
|
||||||
&viewInfo,
|
&viewInfo,
|
||||||
&mClipMoveState.capturedClipArray,
|
&mClipMoveState.capturedClipArray,
|
||||||
&mClipMoveState.trackExclusions,
|
&mClipMoveState.trackExclusions,
|
||||||
@ -783,10 +783,6 @@ UIHandle::Result TimeShiftHandle::Release
|
|||||||
|
|
||||||
Result result = RefreshNone;
|
Result result = RefreshNone;
|
||||||
|
|
||||||
mCapturedTrack.reset();
|
|
||||||
mSnapManager.reset(NULL);
|
|
||||||
mClipMoveState.capturedClipArray.clear();
|
|
||||||
|
|
||||||
// Do not draw yellow lines
|
// Do not draw yellow lines
|
||||||
if ( mClipMoveState.snapLeft != -1 || mClipMoveState.snapRight != -1) {
|
if ( mClipMoveState.snapLeft != -1 || mClipMoveState.snapRight != -1) {
|
||||||
mClipMoveState.snapLeft = mClipMoveState.snapRight = -1;
|
mClipMoveState.snapLeft = mClipMoveState.snapRight = -1;
|
||||||
@ -842,9 +838,6 @@ UIHandle::Result TimeShiftHandle::Release
|
|||||||
UIHandle::Result TimeShiftHandle::Cancel(AudacityProject *pProject)
|
UIHandle::Result TimeShiftHandle::Cancel(AudacityProject *pProject)
|
||||||
{
|
{
|
||||||
pProject->RollbackState();
|
pProject->RollbackState();
|
||||||
mCapturedTrack.reset();
|
|
||||||
mSnapManager.reset();
|
|
||||||
mClipMoveState.clear();
|
|
||||||
return RefreshCode::RefreshAll;
|
return RefreshCode::RefreshAll;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ public:
|
|||||||
explicit TimeShiftHandle
|
explicit TimeShiftHandle
|
||||||
( const std::shared_ptr<Track> &pTrack, bool gripHit );
|
( const std::shared_ptr<Track> &pTrack, bool gripHit );
|
||||||
|
|
||||||
TimeShiftHandle &operator=(TimeShiftHandle&&) = default;
|
TimeShiftHandle &operator=(const TimeShiftHandle&) = default;
|
||||||
|
|
||||||
bool IsGripHit() const { return mGripHit; }
|
bool IsGripHit() const { return mGripHit; }
|
||||||
std::shared_ptr<Track> GetTrack() const { return mCapturedTrack; }
|
std::shared_ptr<Track> GetTrack() const { return mCapturedTrack; }
|
||||||
@ -112,7 +112,7 @@ private:
|
|||||||
// line up with existing tracks or labels. mSnapLeft and mSnapRight
|
// line up with existing tracks or labels. mSnapLeft and mSnapRight
|
||||||
// are the horizontal index of pixels to display user feedback
|
// are the horizontal index of pixels to display user feedback
|
||||||
// guidelines so the user knows when such snapping is taking place.
|
// guidelines so the user knows when such snapping is taking place.
|
||||||
std::unique_ptr<SnapManager> mSnapManager{};
|
std::shared_ptr<SnapManager> mSnapManager{};
|
||||||
|
|
||||||
ClipMoveState mClipMoveState{};
|
ClipMoveState mClipMoveState{};
|
||||||
bool mGripHit {};
|
bool mGripHit {};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user