diff --git a/include/Timeline.h b/include/Timeline.h index 096cca874..f5f8405e2 100644 --- a/include/Timeline.h +++ b/include/Timeline.h @@ -50,13 +50,13 @@ public: auto ticks() const -> tick_t { return m_pos.getTicks(); } //! Forcefully sets the current ticks, resets the frame offset, and sets the elapsed seconds based on the global position (ignoring potential mid-song tempo changes) - //! This function will emit the `positionJumped` signal to allow other widgets to update accordingly - void setTicks(tick_t ticks) + //! Unless `jumped` is passed as false, this function will emit the `positionJumped` signal to allow other widgets to update accordingly. + void setTicks(tick_t ticks, bool jumped = true) { m_pos.setTicks(ticks); m_frameOffset = 0; m_elapsedSeconds = ticks * Engine::framesPerTick() / Engine::audioEngine()->outputSampleRate(); - emit positionJumped(); + if (jumped) { emit positionJumped(); } emit positionChanged(); } diff --git a/src/gui/editors/PianoRoll.cpp b/src/gui/editors/PianoRoll.cpp index d57084cc0..e6a0c6a16 100644 --- a/src/gui/editors/PianoRoll.cpp +++ b/src/gui/editors/PianoRoll.cpp @@ -4890,7 +4890,9 @@ void PianoRoll::updatePositionAccompany() } if( (int) pos > 0 ) { - m_timeLine->timeline()->setTicks(pos); + // Passing false to prevent any `positionJumped` signals from being emitted, since this movement is supposed + // to be smoothly tracking the Song's timeline, not the from user forcefully dragging it. + m_timeLine->timeline()->setTicks(pos, false); autoScroll( pos ); } }