diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2014-09-19 23:21:17 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2014-09-19 23:21:31 -0400 |
commit | 5c7d6ae004356ce4be61c6cc65b9b445c03a0fd4 (patch) | |
tree | 0907b65931e57e81732755df3dc1ee93406ec521 | |
parent | 6a971e645dba4458e0f82ee82dba409fe0a64d41 (diff) |
add Location::set_skip() to allow toggling of skip-functionality for a given Location
-rw-r--r-- | libs/ardour/ardour/location.h | 1 | ||||
-rw-r--r-- | libs/ardour/location.cc | 12 |
2 files changed, 13 insertions, 0 deletions
diff --git a/libs/ardour/ardour/location.h b/libs/ardour/ardour/location.h index b3a4e3ff24..754ebb8075 100644 --- a/libs/ardour/ardour/location.h +++ b/libs/ardour/ardour/location.h @@ -85,6 +85,7 @@ class LIBARDOUR_API Location : public SessionHandleRef, public PBD::StatefulDest void set_hidden (bool yn, void *src); void set_cd (bool yn, void *src); void set_is_range_marker (bool yn, void* src); + void set_skip (bool yn); bool is_auto_punch () const { return _flags & IsAutoPunch; } bool is_auto_loop () const { return _flags & IsAutoLoop; } diff --git a/libs/ardour/location.cc b/libs/ardour/location.cc index 94afad679d..df65c5b341 100644 --- a/libs/ardour/location.cc +++ b/libs/ardour/location.cc @@ -376,6 +376,17 @@ Location::set_is_range_marker (bool yn, void*) } void +Location::set_skip (bool yn) +{ + if (is_range_marker() && length() > 0) { + if (set_flag_internal (yn, IsSkip)) { + flags_changed (this); + FlagsChanged (); + } + } +} + +void Location::set_auto_punch (bool yn, void*) { if (is_mark() || _start == _end) { @@ -648,6 +659,7 @@ Locations::Locations (Session& s) Location::changed.connect_same_thread (*this, boost::bind (&Locations::location_changed, this, _1)); Location::start_changed.connect_same_thread (*this, boost::bind (&Locations::location_changed, this, _1)); Location::end_changed.connect_same_thread (*this, boost::bind (&Locations::location_changed, this, _1)); + Location::flags_changed.connect_same_thread (*this, boost::bind (&Locations::location_changed, this, _1)); } Locations::~Locations () |