diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2010-06-14 23:43:10 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2010-06-14 23:43:10 +0000 |
commit | c158c44fab4d5cd0a6fade9213b262849d90dc31 (patch) | |
tree | a2864a310340b2829e2df88915a9fcd07a741f97 /libs/ardour/ardour/midi_model.h | |
parent | f1fc47b0770ec7c1e6bd6de125dbe6627c567028 (diff) |
make note overlap resolution store side effects in a DiffCommand, and add its changes to the DiffCommand being executed, so as to retain "internal" note property changes across undo
git-svn-id: svn://localhost/ardour2/branches/3.0@7256 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/midi_model.h')
-rw-r--r-- | libs/ardour/ardour/midi_model.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libs/ardour/ardour/midi_model.h b/libs/ardour/ardour/midi_model.h index ac578dc5a9..5d1d605c95 100644 --- a/libs/ardour/ardour/midi_model.h +++ b/libs/ardour/ardour/midi_model.h @@ -77,8 +77,9 @@ public: int set_state (const XMLNode&, int version); XMLNode& get_state (); - void add(const NotePtr note); - void remove(const NotePtr note); + void add (const NotePtr note); + void remove (const NotePtr note); + void side_effect_remove (const NotePtr note); void change (const NotePtr note, Property prop, uint8_t new_value); void change (const NotePtr note, Property prop, TimeType new_time); @@ -87,6 +88,9 @@ public: return !_added_notes.empty() || !_removed_notes.empty(); } + DiffCommand& operator+= (const DiffCommand& other); + boost::shared_ptr<MidiModel> model() const { return _model; } + private: boost::shared_ptr<MidiModel> _model; const std::string _name; @@ -144,7 +148,7 @@ public: void set_insert_merge_policy (InsertMergePolicy); protected: - int resolve_overlaps_unlocked (const NotePtr, std::set<NotePtr>* removed = 0); + int resolve_overlaps_unlocked (const NotePtr, void* arg = 0); private: struct WriteLockImpl : public AutomatableSequence<TimeType>::WriteLockImpl { |