summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2017-02-09 12:22:59 +0100
committerPaul Davis <paul@linuxaudiosystems.com>2017-02-09 12:40:59 +0100
commit2f0dc088446d6fb4b7e58120f4faee951d6ac359 (patch)
tree36fe1ad9b1b061b1d1d5683dee79681f3dc50c8e
parent4572b909acfa78341a091d4e6688b4b634b7b9de (diff)
when adding a default start/end range to a Location while saving a template, do not mark the current session dirty
-rw-r--r--libs/ardour/session_state.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc
index 36d3c9868b..dff053dc38 100644
--- a/libs/ardour/session_state.cc
+++ b/libs/ardour/session_state.cc
@@ -1294,6 +1294,7 @@ Session::state (bool full_state)
}
} else {
Locations loc (*this);
+ const bool was_dirty = dirty();
// for a template, just create a new Locations, populate it
// with the default start and end, and get the state for that.
Location* range = new Location (*this, 0, 0, _("session"), Location::IsSessionRange, 0);
@@ -1310,6 +1311,15 @@ Session::state (bool full_state)
}
}
node->add_child_nocopy (locations_state);
+
+ /* adding a location above will have marked the session
+ * dirty. This is an artifact, so fix it if the session wasn't
+ * already dirty
+ */
+
+ if (!was_dirty) {
+ _state_of_the_state = StateOfTheState (_state_of_the_state & ~Dirty);
+ }
}
child = node->add_child ("Bundles");