diff --git a/ChangeLog b/ChangeLog index ac73f4c9b0..28b177f679 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2008-08-22 Tobias Doerffel + * src/gui/piano_roll.cpp: + fixed notes appearing X times in pattern when recording from + MIDI-device (closes #2058971) + * src/gui/automation_editor.cpp: fixed selection of all bars via Ctrl+A (closes #2048163) diff --git a/src/gui/piano_roll.cpp b/src/gui/piano_roll.cpp index e5baa03874..64e490f9fb 100644 --- a/src/gui/piano_roll.cpp +++ b/src/gui/piano_roll.cpp @@ -472,6 +472,11 @@ pianoRoll::~pianoRoll() void pianoRoll::setCurrentPattern( pattern * _new_pattern ) { + if( validPattern() ) + { + m_pattern->getInstrumentTrack()->disconnect( this ); + } + m_pattern = _new_pattern; m_currentPosition = 0; m_currentNote = NULL; @@ -517,9 +522,6 @@ void pianoRoll::setCurrentPattern( pattern * _new_pattern ) // of start-notes and so on...) resizeEvent( NULL ); - // remove all connections to other instrument-tracks - disconnect( this, SLOT( recordNote( const note & ) ) ); - // and now connect to noteDone()-signal of channel so that // we receive note-off-events from it's midi-port for recording it connect( m_pattern->getInstrumentTrack(), @@ -2269,11 +2271,6 @@ void pianoRoll::recordNote( const note & _n ) note n( _n.length(), engine::getSong()->getPlayPos( engine::getSong()->playMode() ) - _n.length(), _n.key(), _n.getVolume(), _n.getPanning() ); - /* - note n( _n.length(), engine::getSong()->getPlayPos( - song::Mode_PlayPattern ) - _n.length(), - _n.key(), _n.getVolume(), _n.getPanning() ); - */ n.quantizeLength( quantization() ); m_pattern->addNote( n ); update();