Fix bug and crash in solo logic

This commit is contained in:
Clement 2018-11-07 17:44:48 -08:00
parent 65a83cb026
commit 8f763dfd50
2 changed files with 3 additions and 3 deletions

View file

@ -311,8 +311,8 @@ void AudioMixerClientData::parseSoloRequest(QSharedPointer<ReceivedMessage> mess
if (addToSolo) {
_soloedNodes.push_back(soloedUUID);
} else {
auto it = std::find(std::begin(_soloedNodes), std::end(_soloedNodes), soloedUUID);
_soloedNodes.erase(it);
auto it = std::remove(std::begin(_soloedNodes), std::end(_soloedNodes), soloedUUID);
_soloedNodes.erase(it, std::end(_soloedNodes));
}
}
}

View file

@ -284,7 +284,7 @@ AudioClient::AudioClient() :
connect(&domainHandler, &DomainHandler::disconnectedFromDomain, this, [this] {
_solo.reset();
});
connect(nodeList.data(), &NodeList::nodeAdded, this, [this](SharedNodePointer node) {
connect(nodeList.data(), &NodeList::nodeActivated, this, [this](SharedNodePointer node) {
if (node->getType() == NodeType::AudioMixer) {
_solo.resend();
}