13
0

sfdb_ui should be smart if there's no auditioner

This commit is contained in:
Paul Davis 2024-04-02 18:01:48 -06:00
parent 8f7f204ae4
commit 43e0f08b93

View File

@ -286,9 +286,11 @@ SoundFileBox::set_session(Session* s)
auditioner_connections.drop_connections(); auditioner_connections.drop_connections();
} else { } else {
auditioner_connections.drop_connections(); auditioner_connections.drop_connections();
if (_session->the_auditioner()) {
_session->AuditionActive.connect(auditioner_connections, invalidator (*this), boost::bind (&SoundFileBox::audition_active, this, _1), gui_context()); _session->AuditionActive.connect(auditioner_connections, invalidator (*this), boost::bind (&SoundFileBox::audition_active, this, _1), gui_context());
_session->the_auditioner()->AuditionProgress.connect(auditioner_connections, invalidator (*this), boost::bind (&SoundFileBox::audition_progress, this, _1, _2), gui_context()); _session->the_auditioner()->AuditionProgress.connect(auditioner_connections, invalidator (*this), boost::bind (&SoundFileBox::audition_progress, this, _1, _2), gui_context());
} }
}
} }
void void