summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorBen Loftis <ben@harrisonconsoles.com>2014-07-01 16:43:00 -0500
committerBen Loftis <ben@harrisonconsoles.com>2014-07-01 16:43:00 -0500
commit190542c1d0bc81b498229453e62e85b42bdf8246 (patch)
tree2383a7c8a395587b6659dc1097789ba3d181be33 /libs
parent960e5a3c7cb2ed1f0f2a8be0c417c6ee61e78f27 (diff)
splice mode is undefined, undocumented, and buggy. ripple does most of what we want. remove splice for now. leave code because it may be revived later
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/enums.cc5
-rw-r--r--libs/pbd/enumwriter.cc34
2 files changed, 22 insertions, 17 deletions
diff --git a/libs/ardour/enums.cc b/libs/ardour/enums.cc
index 6f4158d5de..54f1e602be 100644
--- a/libs/ardour/enums.cc
+++ b/libs/ardour/enums.cc
@@ -238,6 +238,11 @@ setup_enum_writer ()
REGISTER_ENUM (Ripple); // XXX do the old enum values have to stay in order?
REGISTER_ENUM (Lock);
REGISTER (_EditMode);
+ /*
+ * Splice mode is undefined, undocumented, and basically fubar'ed
+ * perhaps someday we will make it work. but for now, avoid it
+ */
+ enum_writer.add_to_hack_table ("Splice", "Slide");
REGISTER_ENUM (Start);
REGISTER_ENUM (End);
diff --git a/libs/pbd/enumwriter.cc b/libs/pbd/enumwriter.cc
index 6d911b2dea..f67d305080 100644
--- a/libs/pbd/enumwriter.cc
+++ b/libs/pbd/enumwriter.cc
@@ -279,6 +279,23 @@ EnumWriter::read_distinct (EnumRegistration& er, string str)
vector<int>::iterator i;
vector<string>::iterator s;
+ /* first, check to see if there a hack for the name we're looking up */
+
+ map<string,string>::iterator x;
+
+ if ((x = hack_table.find (str)) != hack_table.end()) {
+
+ cerr << "found hack for " << str << " = " << x->second << endl;
+
+ str = x->second;
+
+ for (i = er.values.begin(), s = er.names.begin(); i != er.values.end(); ++i, ++s) {
+ if (str == (*s) || nocase_cmp (str, *s) == 0) {
+ return (*i);
+ }
+ }
+ }
+
/* catch old-style hex numerics */
if (str.length() > 2 && str[0] == '0' && str[1] == 'x') {
@@ -299,23 +316,6 @@ EnumWriter::read_distinct (EnumRegistration& er, string str)
}
}
- /* failed to find it as-is. check to see if there a hack for the name we're looking up */
-
- map<string,string>::iterator x;
-
- if ((x = hack_table.find (str)) != hack_table.end()) {
-
- cerr << "found hack for " << str << " = " << x->second << endl;
-
- str = x->second;
-
- for (i = er.values.begin(), s = er.names.begin(); i != er.values.end(); ++i, ++s) {
- if (str == (*s) || nocase_cmp (str, *s) == 0) {
- return (*i);
- }
- }
- }
-
throw unknown_enumeration(str);
}