diff --git a/SConstruct b/SConstruct
index 9f7e915b3d..da2c6111cc 100644
--- a/SConstruct
+++ b/SConstruct
@@ -1076,7 +1076,13 @@ if not conf.CheckFunc('posix_memalign'):
env = conf.Finish()
+# generate the per-user and system rc files from the same source
+
rcbuild = env.SubstInFile ('ardour.rc','ardour.rc.in', SUBST_DICT = subst_dict)
+sysrcbuild = env.SubstInFile ('ardour_system.rc','ardour.rc.in', SUBST_DICT = subst_dict)
+
+# add to the substitution dictionary
+
subst_dict['%VERSION%'] = ardour_version[0:3]
subst_dict['%EXTRA_VERSION%'] = ardour_version[3:]
subst_dict['%REVISION_STRING%'] = ''
@@ -1092,6 +1098,7 @@ env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour
env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour.rc'))
Default (rcbuild)
+Default (sysrcbuild)
# source tarball
diff --git a/ardour.rc.in b/ardour.rc.in
index a1d0d37177..79ef80799b 100644
--- a/ardour.rc.in
+++ b/ardour.rc.in
@@ -32,6 +32,7 @@
+
@@ -40,3 +41,4 @@
+
diff --git a/ardour_system.rc b/ardour_system.rc
index b7f6c22e9b..77ffd5bb34 100644
--- a/ardour_system.rc
+++ b/ardour_system.rc
@@ -1,5 +1,8 @@
+
+
+
@@ -8,10 +11,34 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
diff --git a/libs/ardour/audio_playlist.cc b/libs/ardour/audio_playlist.cc
index 501482c840..1a7405dbd3 100644
--- a/libs/ardour/audio_playlist.cc
+++ b/libs/ardour/audio_playlist.cc
@@ -30,6 +30,7 @@
#include
#include
#include
+#include
#include "i18n.h"
@@ -381,6 +382,7 @@ AudioPlaylist::check_dependents (boost::shared_ptr r, bool norefresh)
}
+
OverlapType c = top->coverage (bottom->position(), bottom->last_frame());
try {
@@ -411,7 +413,7 @@ AudioPlaylist::check_dependents (boost::shared_ptr r, bool norefresh)
xfade = boost::shared_ptr (new Crossfade (top, bottom, xfade_length, top->first_frame(), StartOfIn));
add_crossfade (xfade);
-
+
if (top_region_at (top->last_frame() - 1) == top) {
/*
only add a fade out if there is no region on top of the end of 'top' (which
diff --git a/libs/ardour/session_command.cc b/libs/ardour/session_command.cc
index 53d01219b1..d7fc80aa4b 100644
--- a/libs/ardour/session_command.cc
+++ b/libs/ardour/session_command.cc
@@ -79,8 +79,11 @@ Session::memento_command_factory(XMLNode *n)
/* create command */
string obj_T = n->property ("type_name")->value();
if (obj_T == typeid (AudioRegion).name() || obj_T == typeid (Region).name()) {
- if (audio_regions.count(id))
+ if (audio_regions.count(id)) {
return new MementoCommand(*audio_regions[id], before, after);
+ } else {
+ cerr << "count failed for " << id << " though we have " << audio_regions.size() << endl;
+ }
} else if (obj_T == typeid (AudioSource).name()) {
if (audio_sources.count(id))
return new MementoCommand(*audio_sources[id], before, after);
@@ -105,6 +108,7 @@ Session::memento_command_factory(XMLNode *n)
/* we failed */
error << string_compose (_("could not reconstitute MementoCommand from XMLNode. object type = %1 id = %2"), obj_T, id.to_s()) << endmsg;
+
return 0 ;
}