1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-14 17:14:07 +01:00

Keep the current note centered when holding control to zoom

This commit is contained in:
Pokechu22
2017-07-04 01:02:43 -07:00
committed by Paul Licameli
parent 776e4dfdab
commit b46abbec62
3 changed files with 22 additions and 13 deletions

View File

@@ -236,7 +236,7 @@ unsigned NoteTrackVRulerControls::HandleWheelRotation
const auto nt = static_cast<NoteTrack*>(pTrack.get());
if (event.CmdDown() && !event.ShiftDown()) {
nt->Zoom(evt.rect, evt.event.m_y, (int) (steps));
nt->Zoom(evt.rect, evt.event.m_y, (int) (steps), false);
} else if (!event.CmdDown() && event.ShiftDown()) {
// Scroll some fixed number of notes, independent of zoom level or track height:
static const int movement = 6; // 6 semitones is half an octave