InstrumentTrackWindow: correctly disconnect from track's signals

We used QObject::disconnect() the wrong way leading to multiple
connections from InstrumentTrack::instrumentChanged() to
InstrumentTrackWindow::updateInstrumentView(). This resulted in
loading times being doubled each time you loaded a preset on the same
InstrumentTrack.

Closes #2934099.
(cherry picked from commit 9acb47a7a8)
This commit is contained in:
Tobias Doerffel
2010-08-15 14:19:43 +02:00
parent cd08109847
commit 564ef08127

View File

@@ -1295,8 +1295,8 @@ void InstrumentTrackWindow::modelChanged()
m_nameLineEdit->setText( m_track->name() );
disconnect( m_track, SIGNAL( nameChanged() ) );
disconnect( m_track, SIGNAL( instrumentChanged() ) );
m_track->disconnect( SIGNAL( nameChanged() ), this );
m_track->disconnect( SIGNAL( instrumentChanged() ), this );
connect( m_track, SIGNAL( nameChanged() ),
this, SLOT( updateName() ) );