From 1b4ae873729696d9338a1ec36496e94b8139a5a7 Mon Sep 17 00:00:00 2001 From: Jonas Suhr Christensen Date: Wed, 22 Oct 2014 15:50:13 +0200 Subject: Added instrument channel number to drumkitinfo. --- plugingui/plugingui.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugingui/plugingui.cc b/plugingui/plugingui.cc index 6530ea2..19f6dca 100644 --- a/plugingui/plugingui.cc +++ b/plugingui/plugingui.cc @@ -245,11 +245,16 @@ void PluginGUI::handleMessage(Message *msg) metadatatext.append("Channels:\n"); std::vector >::iterator channels_it; + int count = 1; for(channels_it = m.channels.begin(); channels_it != m.channels.end(); channels_it++) { std::string name = channels_it->first; std::string microphone = channels_it->second; - metadatatext.append("\t" + name + ": " + microphone + "\n"); + std::string count_str; + count_str << count; + metadatatext.append("\t"+ count_str + ". " + name + ": " + microphone + "\n"); +//C++11 only: metadatatext.append("\t"+ std::to_string(count) + ". " + name + ": " + microphone + "\n"); + count++; } metadatatext.append("\n\n"); -- cgit v1.2.3