Bugfix Duplicate input mapping

This commit is contained in:
Bruno Herbelin
2022-03-19 14:58:27 +01:00
parent 82dad0fad3
commit f49d94948d

View File

@@ -742,9 +742,9 @@ void Session::swapSourceCallback(uint from, uint to)
void Session::copySourceCallback(uint from, uint to)
{
if ( input_callbacks_.count(from) > 0 ) {
auto result = input_callbacks_.equal_range(from);
for (auto it = result.first; it != result.second; ++it) {
assignSourceCallback(to, it->second.source_, it->second.model_->clone() );
auto from_callbacks = getSourceCallbacks(from);
for (auto it = from_callbacks.cbegin(); it != from_callbacks.cend(); ++it){
assignSourceCallback(to, it->first, it->second->clone() );
}
}
}