diff options
author | Carl Hetherington <carl@carlh.net> | 2010-08-29 01:09:05 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2010-08-29 01:09:05 +0000 |
commit | 3150041423a199189c9b6ab292a078c51d9670c2 (patch) | |
tree | a5a92d2fc568edb7743e8018ca05d5de0f09c486 /libs/pbd/pbd/sequence_property.h | |
parent | bce90b1802565f62288a5081929244d60e15a5bd (diff) |
(Hopefully) clarify operator= and copy construction behaviour of the Property hierarchy. Also make operator= copy the value but NOT the property ID; this stops e.g. a = b giving a the property ID of b and confusing things. Fixes some problems with save/restore of region sync position.
git-svn-id: svn://localhost/ardour2/branches/3.0@7707 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/pbd/pbd/sequence_property.h')
-rw-r--r-- | libs/pbd/pbd/sequence_property.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libs/pbd/pbd/sequence_property.h b/libs/pbd/pbd/sequence_property.h index 4b494d4a8d..7d94a4be6b 100644 --- a/libs/pbd/pbd/sequence_property.h +++ b/libs/pbd/pbd/sequence_property.h @@ -344,6 +344,15 @@ class SequenceProperty : public PropertyBase const ChangeRecord& changes () const { return _changes; } protected: + + /* copy construction only by subclasses */ + SequenceProperty (SequenceProperty<Container> const & p) + : PropertyBase (p) + , _val (p._val) + , _changes (p._changes) + , _update_callback (p._update_callback) + {} + Container _val; ///< our actual container of things ChangeRecord _changes; ///< changes to the container (adds/removes) that have happened since clear_changes() was last called boost::function<void(const ChangeRecord&)> _update_callback; |