diff --git a/ChangeLog b/ChangeLog index 4ac72d60c..c6bdfca3d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-10-29 Tobias Doerffel + + * include/timeline.h: + * src/gui/piano_roll.cpp: + fixed autoscroll feature in piano-roll (closes #2204508) + 2008-10-28 Tobias Doerffel * CMakeLists.txt: diff --git a/include/timeline.h b/include/timeline.h index 2e9e6abf8..4014b79ab 100644 --- a/include/timeline.h +++ b/include/timeline.h @@ -69,26 +69,31 @@ public: return( m_pos ); } + AutoScrollStates autoScroll( void ) const + { + return m_autoScroll; + } + BehaviourAtStopStates behaviourAtStop( void ) const { - return( m_behaviourAtStop ); + return m_behaviourAtStop; } bool loopPointsEnabled( void ) const { - return( m_loopPoints == LoopPointsEnabled ); + return m_loopPoints == LoopPointsEnabled; } inline const midiTime & loopBegin( void ) const { - return( ( m_loopPos[0] < m_loopPos[1] ) ? - m_loopPos[0] : m_loopPos[1] ); + return ( m_loopPos[0] < m_loopPos[1] ) ? + m_loopPos[0] : m_loopPos[1]; } inline const midiTime & loopEnd( void ) const { - return( ( m_loopPos[0] > m_loopPos[1] ) ? - m_loopPos[0] : m_loopPos[1] ); + return ( m_loopPos[0] > m_loopPos[1] ) ? + m_loopPos[0] : m_loopPos[1]; } inline void savePos( const midiTime & _pos ) @@ -97,7 +102,7 @@ public: } inline const midiTime & savedPos( void ) const { - return( m_savedPos ); + return m_savedPos; } inline void setPixelsPerTact( float _ppt ) @@ -113,13 +118,13 @@ public: virtual void loadSettings( const QDomElement & _this ); inline virtual QString nodeName( void ) const { - return( "timeline" ); + return "timeline"; } inline int markerX( const midiTime & _t ) const { - return( m_xOffset + static_cast( ( _t - m_begin ) * - m_ppt / midiTime::ticksPerTact() ) ); + return m_xOffset + static_cast( ( _t - m_begin ) * + m_ppt / midiTime::ticksPerTact() ); } diff --git a/src/gui/piano_roll.cpp b/src/gui/piano_roll.cpp index f4ec2c8b0..54010efd8 100644 --- a/src/gui/piano_roll.cpp +++ b/src/gui/piano_roll.cpp @@ -2670,7 +2670,8 @@ void pianoRoll::updatePosition( const midiTime & _t ) { if( ( engine::getSong()->isPlaying() && engine::getSong()->playMode() == - song::Mode_PlayPattern ) || + song::Mode_PlayPattern && + m_timeLine->autoScroll() == timeLine::AutoScrollEnabled ) || m_scrollBack == true ) { const int w = width() - WHITE_KEY_WIDTH;