diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2019-10-18 10:26:30 -0600 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2019-11-02 16:32:18 -0600 |
commit | a08012214fea09567b78086b5ca076c3369dcb16 (patch) | |
tree | 29c74e3ac04e9af4873a8270a8e4b3b8876a76ad /libs/ardour/region.cc | |
parent | f21dd03a0fb9095779510e43f2f7ca6bec6e1183 (diff) |
add a new "contents" pseudo-property to Region
The type of this property doesn't matter - it only exists so that we can
signal a change to the (MIDI) contents of a Region via PropertyChanged
Diffstat (limited to 'libs/ardour/region.cc')
-rw-r--r-- | libs/ardour/region.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libs/ardour/region.cc b/libs/ardour/region.cc index 94083bd73a..635b87fb0f 100644 --- a/libs/ardour/region.cc +++ b/libs/ardour/region.cc @@ -81,6 +81,7 @@ namespace ARDOUR { PBD::PropertyDescriptor<PositionLockStyle> position_lock_style; PBD::PropertyDescriptor<uint64_t> layering_index; PBD::PropertyDescriptor<std::string> tags; + PBD::PropertyDescriptor<bool> contents; } } @@ -143,6 +144,8 @@ Region::make_property_quarks () DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for layering_index = %1\n", Properties::layering_index.property_id)); Properties::tags.property_id = g_quark_from_static_string (X_("tags")); DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for tags = %1\n", Properties::tags.property_id)); + Properties::contents.property_id = g_quark_from_static_string (X_("contents")); + DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for contents = %1\n", Properties::contents.property_id)); } void @@ -176,6 +179,7 @@ Region::register_properties () add_property (_position_lock_style); add_property (_layering_index); add_property (_tags); + add_property (_contents); } #define REGION_DEFAULT_STATE(s,l) \ @@ -209,7 +213,8 @@ Region::register_properties () , _shift (Properties::shift, 1.0) \ , _position_lock_style (Properties::position_lock_style, _type == DataType::AUDIO ? AudioTime : MusicTime) \ , _layering_index (Properties::layering_index, 0) \ - , _tags (Properties::tags, "") + , _tags (Properties::tags, "") \ + , _contents (Properties::contents, false) #define REGION_COPY_STATE(other) \ _sync_marked (Properties::sync_marked, other->_sync_marked) \ @@ -244,7 +249,8 @@ Region::register_properties () , _shift (Properties::shift, other->_shift) \ , _position_lock_style (Properties::position_lock_style, other->_position_lock_style) \ , _layering_index (Properties::layering_index, other->_layering_index) \ - , _tags (Properties::tags, other->_tags) + , _tags (Properties::tags, other->_tags) \ + , _contents (Properties::contents, other->_contents) /* derived-from-derived constructor (no sources in constructor) */ Region::Region (Session& s, samplepos_t start, samplecnt_t length, const string& name, DataType type) |