summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2017-02-09 12:39:44 +0100
committerPaul Davis <paul@linuxaudiosystems.com>2017-02-09 12:40:59 +0100
commitc816d34d68a70fbc42f3d6edded49e999fffd575 (patch)
tree1f91342f8d03091525b36b8e416f3092a14642d3
parent668d970dd04340de6abb4538e7f98afe188cd847 (diff)
explanatory comment and logic change to cover when we switch to the new session after save-as
-rw-r--r--gtk2_ardour/ardour_ui.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc
index 2b9624b663..e5b13c821c 100644
--- a/gtk2_ardour/ardour_ui.cc
+++ b/gtk2_ardour/ardour_ui.cc
@@ -2665,7 +2665,15 @@ ARDOUR_UI::save_session_as ()
msg.run ();
}
- if (!sa.include_media) {
+ /* the logic here may seem odd: why isn't the condition sa.switch_to ?
+ * the trick is this: if the new session was copy with media included,
+ * then Session::save_as() will have already done a neat trick to avoid
+ * us having to unload and load the new state. But if the media was not
+ * included, then this is required (it avoids us having to otherwise
+ * drop all references to media (sources).
+ */
+
+ if (!sa.include_media && sa.switch_to) {
unload_session (false);
load_session (sa.final_session_folder_name, sa.new_name);
hide_splash ();