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:
@@ -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() ) );
|
||||
|
||||
Reference in New Issue
Block a user