MCP: use goto-visual-state-N as default function key bindings
authorPaul Davis <paul@linuxaudiosystems.com>
Wed, 11 Apr 2012 17:18:32 +0000 (17:18 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Wed, 11 Apr 2012 17:18:32 +0000 (17:18 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@11909 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/surfaces/mackie/mackie_control_protocol.cc

index baf74596fae2dc77f7316d411470a5f4cb8f352e..4360525cebc9339effb1c21da6c4b986a4d5145a 100644 (file)
@@ -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;