mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-02 08:59:28 +02:00
Remove unused variable
This commit is contained in:
parent
48889d36f0
commit
0ca907a1a7
@ -120,7 +120,6 @@ UIHandlePtr StretchHandle::HitTest
|
|||||||
auto selStart = viewInfo.PositionToTime( state.m_x, rect.x );
|
auto selStart = viewInfo.PositionToTime( state.m_x, rect.x );
|
||||||
selStart = std::max(t0, std::min(t1, selStart));
|
selStart = std::max(t0, std::min(t1, selStart));
|
||||||
stretchState.mBeatCenter = pTrack->NearestBeatTime( selStart );
|
stretchState.mBeatCenter = pTrack->NearestBeatTime( selStart );
|
||||||
bool startNewSelection = true;
|
|
||||||
if ( within( stretchState.mBeat0.second,
|
if ( within( stretchState.mBeat0.second,
|
||||||
stretchState.mBeatCenter.second, 0.1 ) ) {
|
stretchState.mBeatCenter.second, 0.1 ) ) {
|
||||||
stretchState.mMode = stretchLeft;
|
stretchState.mMode = stretchLeft;
|
||||||
|
@ -493,12 +493,14 @@ void SelectHandle::SetUseSnap(bool use)
|
|||||||
// Repaint to turn the snap lines on or off
|
// Repaint to turn the snap lines on or off
|
||||||
mChangeHighlight = RefreshCode::RefreshAll;
|
mChangeHighlight = RefreshCode::RefreshAll;
|
||||||
|
|
||||||
if (hasSnap && IsClicked())
|
if (IsClicked()) {
|
||||||
// Readjust the moving selection end
|
// Readjust the moving selection end
|
||||||
AssignSelection(
|
AssignSelection(
|
||||||
::GetActiveProject()->GetViewInfo(),
|
::GetActiveProject()->GetViewInfo(),
|
||||||
mUseSnap ? mSnapEnd.outTime : mSnapEnd.timeSnappedTime,
|
mUseSnap ? mSnapEnd.outTime : mSnapEnd.timeSnappedTime,
|
||||||
nullptr);
|
nullptr);
|
||||||
|
mChangeHighlight |= RefreshCode::UpdateSelection;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SelectHandle::HasSnap() const
|
bool SelectHandle::HasSnap() const
|
||||||
@ -598,7 +600,6 @@ UIHandle::Result SelectHandle::Click
|
|||||||
auto pMixerBoard = pProject->GetMixerBoard();
|
auto pMixerBoard = pProject->GetMixerBoard();
|
||||||
|
|
||||||
mSelStart = mUseSnap ? mSnapStart.outTime : mSnapStart.timeSnappedTime;
|
mSelStart = mUseSnap ? mSnapStart.outTime : mSnapStart.timeSnappedTime;
|
||||||
auto xx = viewInfo.TimeToPosition(mSelStart, mRect.x);
|
|
||||||
|
|
||||||
// I. Shift-click adjusts an existing selection
|
// I. Shift-click adjusts an existing selection
|
||||||
if (bShiftDown || bCtrlDown) {
|
if (bShiftDown || bCtrlDown) {
|
||||||
@ -619,7 +620,7 @@ UIHandle::Result SelectHandle::Click
|
|||||||
double value;
|
double value;
|
||||||
// Shift-click, choose closest boundary
|
// Shift-click, choose closest boundary
|
||||||
SelectionBoundary boundary =
|
SelectionBoundary boundary =
|
||||||
ChooseBoundary(viewInfo, xx, event.m_y, pTrack, mRect, false, false, &value);
|
ChooseBoundary(viewInfo, event.m_x, event.m_y, pTrack, mRect, false, false, &value);
|
||||||
mSelectionBoundary = boundary;
|
mSelectionBoundary = boundary;
|
||||||
switch (boundary) {
|
switch (boundary) {
|
||||||
case SBLeft:
|
case SBLeft:
|
||||||
@ -631,8 +632,7 @@ UIHandle::Result SelectHandle::Click
|
|||||||
mFreqSelMode = FREQ_SEL_INVALID;
|
mFreqSelMode = FREQ_SEL_INVALID;
|
||||||
#endif
|
#endif
|
||||||
mSelStartValid = true;
|
mSelStartValid = true;
|
||||||
if (!(mUseSnap && mSnapStart.Snapped()))
|
mSelStart = value;
|
||||||
mSelStart = value;
|
|
||||||
AdjustSelection(pProject, viewInfo, event.m_x, mRect.x, pTrack);
|
AdjustSelection(pProject, viewInfo, event.m_x, mRect.x, pTrack);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -713,7 +713,7 @@ UIHandle::Result SelectHandle::Click
|
|||||||
// Not shift-down, choose boundary only within snapping
|
// Not shift-down, choose boundary only within snapping
|
||||||
double value;
|
double value;
|
||||||
SelectionBoundary boundary =
|
SelectionBoundary boundary =
|
||||||
ChooseBoundary(viewInfo, xx, event.m_y, pTrack, mRect, true, true, &value);
|
ChooseBoundary(viewInfo, event.m_x, event.m_y, pTrack, mRect, true, true, &value);
|
||||||
mSelectionBoundary = boundary;
|
mSelectionBoundary = boundary;
|
||||||
switch (boundary) {
|
switch (boundary) {
|
||||||
case SBNone:
|
case SBNone:
|
||||||
@ -727,8 +727,7 @@ UIHandle::Result SelectHandle::Click
|
|||||||
mFreqSelMode = FREQ_SEL_INVALID;
|
mFreqSelMode = FREQ_SEL_INVALID;
|
||||||
#endif
|
#endif
|
||||||
mSelStartValid = true;
|
mSelStartValid = true;
|
||||||
if (!(mUseSnap && mSnapStart.Snapped()))
|
mSelStart = value;
|
||||||
mSelStart = value;
|
|
||||||
break;
|
break;
|
||||||
#ifdef EXPERIMENTAL_SPECTRAL_EDITING
|
#ifdef EXPERIMENTAL_SPECTRAL_EDITING
|
||||||
case SBBottom:
|
case SBBottom:
|
||||||
@ -1178,9 +1177,9 @@ void SelectHandle::AdjustSelection
|
|||||||
// using snap-to-time -- then we always accept the snap results)
|
// using snap-to-time -- then we always accept the snap results)
|
||||||
if (mSnapStart.outCoord >= 0 &&
|
if (mSnapStart.outCoord >= 0 &&
|
||||||
mSnapEnd.outCoord >= 0 &&
|
mSnapEnd.outCoord >= 0 &&
|
||||||
std::abs(mSnapStart.outCoord - mSnapEnd.outCoord) < 3 &&
|
std::abs(mSnapStart.outCoord - mSnapEnd.outCoord) < 3) {
|
||||||
!mSnapEnd.snappedTime) {
|
if(!mSnapEnd.snappedTime)
|
||||||
selend = origSelend;
|
selend = origSelend;
|
||||||
mSnapEnd.outCoord = -1;
|
mSnapEnd.outCoord = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user