diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2009-09-09 16:46:18 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2009-09-09 16:46:18 +0000 |
commit | 5f319d0a08a4950f4cb8ee1bdc39f35bfce088bc (patch) | |
tree | cb5bec0a2fabe857984c7022c4b624562137a107 /gtk2_ardour/canvas-note-event.cc | |
parent | 58f5ad640672d3ac0193b36befaa8d53dddefecf (diff) |
re-use canvas note items when the model changes ; slightly more efficient (probably) and avoids invalidating references to said items in, for example, ResizeData in a copied region
git-svn-id: svn://localhost/ardour2/branches/3.0@5650 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/canvas-note-event.cc')
-rw-r--r-- | gtk2_ardour/canvas-note-event.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gtk2_ardour/canvas-note-event.cc b/gtk2_ardour/canvas-note-event.cc index 9404c15c2d..55e31db4e1 100644 --- a/gtk2_ardour/canvas-note-event.cc +++ b/gtk2_ardour/canvas-note-event.cc @@ -47,6 +47,7 @@ CanvasNoteEvent::CanvasNoteEvent(MidiRegionView& region, Item* item, , _state(None) , _note(note) , _selected(false) + , _valid (true) { } @@ -60,6 +61,18 @@ CanvasNoteEvent::~CanvasNoteEvent() delete _channel_selector_widget; } +void +CanvasNoteEvent::invalidate () +{ + _valid = false; +} + +void +CanvasNoteEvent::validate () +{ + _valid = true; +} + void CanvasNoteEvent::move_event(double dx, double dy) { |