From f49d94948d4c5de398bd6c49ecdb1f33cacd8c39 Mon Sep 17 00:00:00 2001 From: Bruno Herbelin Date: Sat, 19 Mar 2022 14:58:27 +0100 Subject: [PATCH] Bugfix Duplicate input mapping --- Session.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Session.cpp b/Session.cpp index b27c6e8..80a8254 100644 --- a/Session.cpp +++ b/Session.cpp @@ -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() ); } } }