fixed glitch where it would auto-scroll even if it was off in song-editor
auto-scroll default to disabled git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1876 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -2,6 +2,13 @@
|
||||
|
||||
* src/gui/piano_roll.cpp:
|
||||
(hopefully) fixed bug where shift+drag wasn't copying notes
|
||||
|
||||
* src/core/timeline.cpp:
|
||||
* include/song_editor.h:
|
||||
* src/gui/song_editor.cpp:
|
||||
auto-scroll default to disabled
|
||||
fixed glitch where it would auto-scroll even if it was off in song-editor
|
||||
|
||||
|
||||
2008-12-05 Andrew Kelley <superjoe30/at/gmail/dot/com>
|
||||
|
||||
|
||||
@@ -90,6 +90,8 @@ private:
|
||||
toolButton * m_recordButton;
|
||||
toolButton * m_recordAccompanyButton;
|
||||
toolButton * m_stopButton;
|
||||
|
||||
timeLine * m_timeLine;
|
||||
|
||||
toolButton * m_addBBTrackButton;
|
||||
toolButton * m_addSampleTrackButton;
|
||||
|
||||
@@ -52,7 +52,7 @@ timeLine::timeLine( const int _xoff, const int _yoff, const float _ppt,
|
||||
song::playPos & _pos, const midiTime & _begin,
|
||||
QWidget * _parent ) :
|
||||
QWidget( _parent ),
|
||||
m_autoScroll( AutoScrollEnabled ),
|
||||
m_autoScroll( AutoScrollDisabled ),
|
||||
m_loopPoints( LoopPointsDisabled ),
|
||||
m_behaviourAtStop( BackToZero ),
|
||||
m_changedPosition( TRUE ),
|
||||
@@ -122,6 +122,8 @@ void timeLine::addToolButtons( QWidget * _tool_bar )
|
||||
autoScroll->addState( embed::getIconPixmap( "autoscroll_off" ) );
|
||||
connect( autoScroll, SIGNAL( changedState( int ) ), this,
|
||||
SLOT( toggleAutoScroll( int ) ) );
|
||||
// default to autoscroll off
|
||||
autoScroll->changeState( AutoScrollDisabled );
|
||||
|
||||
nStateButton * loopPoints = new nStateButton( _tool_bar );
|
||||
loopPoints->setGeneralToolTip( tr( "Enable/disable loop-points" ) );
|
||||
|
||||
@@ -83,7 +83,7 @@ songEditor::songEditor( song * _song, songEditor * & _engine_ptr ) :
|
||||
setFocus();
|
||||
|
||||
// create time-line
|
||||
timeLine * tl = new timeLine( TRACK_OP_WIDTH +
|
||||
m_timeLine = new timeLine( TRACK_OP_WIDTH +
|
||||
DEFAULT_SETTINGS_WIDGET_WIDTH, 32,
|
||||
pixelsPerTact(),
|
||||
m_s->m_playPos[song::Mode_PlaySong],
|
||||
@@ -91,7 +91,7 @@ songEditor::songEditor( song * _song, songEditor * & _engine_ptr ) :
|
||||
connect( this, SIGNAL( positionChanged( const midiTime & ) ),
|
||||
m_s->m_playPos[song::Mode_PlaySong].m_timeLine,
|
||||
SLOT( updatePosition( const midiTime & ) ) );
|
||||
connect( tl, SIGNAL( positionChanged( const midiTime & ) ),
|
||||
connect( m_timeLine, SIGNAL( positionChanged( const midiTime & ) ),
|
||||
this, SLOT( updatePosition( const midiTime & ) ) );
|
||||
|
||||
m_positionLine = new positionLine( this );
|
||||
@@ -107,7 +107,7 @@ songEditor::songEditor( song * _song, songEditor * & _engine_ptr ) :
|
||||
m_toolBar->setPalette( pal );
|
||||
|
||||
static_cast<QVBoxLayout *>( layout() )->insertWidget( 0, m_toolBar );
|
||||
static_cast<QVBoxLayout *>( layout() )->insertWidget( 1, tl );
|
||||
static_cast<QVBoxLayout *>( layout() )->insertWidget( 1, m_timeLine );
|
||||
|
||||
QHBoxLayout * tb_layout = new QHBoxLayout( m_toolBar );
|
||||
tb_layout->setMargin( 0 );
|
||||
@@ -232,7 +232,7 @@ songEditor::songEditor( song * _song, songEditor * & _engine_ptr ) :
|
||||
tb_layout->addWidget( m_drawModeButton );
|
||||
tb_layout->addWidget( m_editModeButton );
|
||||
tb_layout->addSpacing( 10 );
|
||||
tl->addToolButtons( m_toolBar );
|
||||
m_timeLine->addToolButtons( m_toolBar );
|
||||
tb_layout->addSpacing( 15 );
|
||||
tb_layout->addWidget( zoom_lbl );
|
||||
tb_layout->addSpacing( 5 );
|
||||
@@ -423,7 +423,8 @@ void songEditor::wheelEvent( QWheelEvent * _we )
|
||||
|
||||
void songEditor::updatePosition( const midiTime & _t )
|
||||
{
|
||||
if( ( m_s->isPlaying() && m_s->m_playMode == song::Mode_PlaySong ) ||
|
||||
if( ( m_s->isPlaying() && m_s->m_playMode == song::Mode_PlaySong
|
||||
&& m_timeLine->autoScroll() == timeLine::AutoScrollEnabled) ||
|
||||
m_scrollBack == TRUE )
|
||||
{
|
||||
const int w = width() - DEFAULT_SETTINGS_WIDGET_WIDTH
|
||||
|
||||
Reference in New Issue
Block a user