diff options
author | nick_m <mainsbridge@gmail.com> | 2017-01-30 01:46:38 +1100 |
---|---|---|
committer | nick_m <mainsbridge@gmail.com> | 2017-01-30 01:46:38 +1100 |
commit | ab052d056591b200851f86436f3e3ef671a5e504 (patch) | |
tree | 759429b555c325c6bacb4972ffc7a140809fdf1f /gtk2_ardour/ghostregion.h | |
parent | d29f6bde5ef1477a36e1e550ef5a548c5b0b1580 (diff) |
speed up midi ghost region update
- as MRV removes invalid notes from the GR, we
can simply update all events after checking vertical visibility.
Diffstat (limited to 'gtk2_ardour/ghostregion.h')
-rw-r--r-- | gtk2_ardour/ghostregion.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gtk2_ardour/ghostregion.h b/gtk2_ardour/ghostregion.h index aa4ec8b2f3..1b2fb700c1 100644 --- a/gtk2_ardour/ghostregion.h +++ b/gtk2_ardour/ghostregion.h @@ -34,6 +34,7 @@ class Hit; class MidiStreamView; class TimeAxisView; class RegionView; +class MidiRegionView; class GhostRegion : public sigc::trackable { @@ -90,12 +91,12 @@ public: bool is_hit; }; - MidiGhostRegion(RegionView& rv, + MidiGhostRegion(MidiRegionView& rv, TimeAxisView& tv, TimeAxisView& source_tv, double initial_unit_pos); - MidiGhostRegion(RegionView& rv, + MidiGhostRegion(MidiRegionView& rv, MidiStreamView& msv, TimeAxisView& source_tv, double initial_unit_pos); @@ -111,10 +112,11 @@ public: void update_contents_height(); void add_note(NoteBase*); - void update_note (Note* note, bool hide); - void update_hit (Hit* hit, bool hide); + void update_note (GhostEvent* note); + void update_hit (GhostEvent* hit); void remove_note (NoteBase*); + void redisplay_model(); void clear_events(); private: @@ -123,6 +125,7 @@ private: ArdourCanvas::Rectangle* _tmp_rect; ArdourCanvas::Polygon* _tmp_poly; + MidiRegionView& parent_mrv; typedef Evoral::Note<Evoral::Beats> NoteType; MidiGhostRegion::GhostEvent* find_event (boost::shared_ptr<NoteType>); |