From 220095b8e0b05929155cc0ef239e081389522ba7 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 11 Apr 2012 17:18:32 +0000 Subject: [PATCH] MCP: use goto-visual-state-N as default function key bindings git-svn-id: svn://localhost/ardour2/branches/3.0@11909 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/surfaces/mackie/mackie_control_protocol.cc | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/libs/surfaces/mackie/mackie_control_protocol.cc b/libs/surfaces/mackie/mackie_control_protocol.cc index baf74596fa..4360525ceb 100644 --- a/libs/surfaces/mackie/mackie_control_protocol.cc +++ b/libs/surfaces/mackie/mackie_control_protocol.cc @@ -572,12 +572,17 @@ MackieControlProtocol::set_state (const XMLNode & node, int /*version*/) _f_actions.resize (16); for (uint32_t n = 0; n < 16; ++n) { - ostringstream s; - s << string_compose ("f%1-action", n+1); - - if ((prop = node.property (s.str())) != 0) { - _f_actions[n] = prop->value(); + string action; + if ((prop = node.property (string_compose ("f%1-action", n+1))) != 0) { + action = prop->value(); } + + if (action.empty()) { + /* default action if nothing is specified */ + action = string_compose ("goto-visual-state-%1", n+1); + } + + _f_actions[n] = action; } return retval;