diff options
author | Carl Hetherington <carl@carlh.net> | 2010-06-23 01:51:55 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2010-06-23 01:51:55 +0000 |
commit | cac03dbeb6ebdcd406385dd14a746cb8c51dd5f8 (patch) | |
tree | 08e3e6cbadedc6b6a4cd5af27d7cad436d893e99 /libs/ardour/ardour | |
parent | 055f839b1f9b435f319b8ad5f99b8d523a0a38f6 (diff) |
Update locations GUI more efficiently by avoiding a rebuild when a location is removed. Fixes #3263.
git-svn-id: svn://localhost/ardour2/branches/3.0@7290 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r-- | libs/ardour/ardour/location.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/libs/ardour/ardour/location.h b/libs/ardour/ardour/location.h index f23d2e382a..7d3b0ac1a9 100644 --- a/libs/ardour/ardour/location.h +++ b/libs/ardour/ardour/location.h @@ -163,15 +163,23 @@ class Locations : public PBD::StatefulDestructible int set_current (Location *, bool want_lock = true); Location *current () const { return current_location; } - Location *first_location_before (nframes64_t, bool include_special_ranges = false); - Location *first_location_after (nframes64_t, bool include_special_ranges = false); + Location* first_location_before (nframes64_t, bool include_special_ranges = false); + Location* first_location_after (nframes64_t, bool include_special_ranges = false); void marks_either_side (nframes64_t const, nframes64_t &, nframes64_t &) const; void find_all_between (nframes64_t start, nframes64_t, LocationList&, Location::Flags); + enum Change { + ADDITION, ///< a location was added, but nothing else changed + REMOVAL, ///< a location was removed, but nothing else changed + OTHER ///< something more complicated happened + }; + PBD::Signal1<void,Location*> current_changed; - PBD::Signal0<void> changed; + /** something changed about the location list; the parameter gives some idea as to what */ + PBD::Signal1<void,Change> changed; + /** a location has been added to the end of the list */ PBD::Signal1<void,Location*> added; PBD::Signal1<void,Location*> removed; PBD::Signal1<void,const PBD::PropertyChange&> StateChanged; |