diff options
author | David Robillard <d@drobilla.net> | 2007-08-01 20:50:09 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-08-01 20:50:09 +0000 |
commit | d7db3f757fde92126ef9886370ce604992b7e974 (patch) | |
tree | 4ac58366ad0a9980756c23ef58e413ce54bf395f /gtk2_ardour/region_view.cc | |
parent | 3f421ac45025a856f03b779363f8f5f60b837b1e (diff) |
Better MidiModel command framework, ready to go for all your canvas editing needs.
Rewrote MidiEvent to be a well-behaved self-contained object that optionally owns it's buffer, has proper copying semantics, etc.
Fixed crazy bugs triggered by adding lots of events with varying times to a region.
Speed up initial session display significantly (don't redraw each MIDI region tons of times, though still happens more than once and can use fixing...).
git-svn-id: svn://localhost/ardour2/trunk@2213 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/region_view.cc')
-rw-r--r-- | gtk2_ardour/region_view.cc | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/gtk2_ardour/region_view.cc b/gtk2_ardour/region_view.cc index 87b384bcd7..27ae6ca7bf 100644 --- a/gtk2_ardour/region_view.cc +++ b/gtk2_ardour/region_view.cc @@ -72,6 +72,7 @@ RegionView::RegionView (ArdourCanvas::Group* parent, , editor(0) , current_visible_sync_position(0.0) , valid(false) + , _enable_display(false) , _pixel_width(1.0) , in_destructor(false) , wait_for_data(false) @@ -87,6 +88,7 @@ RegionView::RegionView (const RegionView& other) editor = other.editor; current_visible_sync_position = other.current_visible_sync_position; valid = false; + _enable_display = false; _pixel_width = other._pixel_width; } @@ -102,6 +104,7 @@ RegionView::RegionView (ArdourCanvas::Group* parent, , editor(0) , current_visible_sync_position(0.0) , valid(false) + , _enable_display(false) , _pixel_width(1.0) , in_destructor(false) , wait_for_data(false) @@ -111,9 +114,10 @@ RegionView::RegionView (ArdourCanvas::Group* parent, void RegionView::init (Gdk::Color& basic_color, bool wfd) { - valid = true; - in_destructor = false; - wait_for_data = wfd; + valid = true; + _enable_display = false; + in_destructor = false; + wait_for_data = wfd; compute_colors (basic_color); @@ -138,6 +142,9 @@ RegionView::init (Gdk::Color& basic_color, bool wfd) reset_width_dependent_items ((double) _region->length() / samples_per_unit); + if (wfd) + _enable_display = true; + set_y_position_and_height (0, trackview.height - 2); _region->StateChanged.connect (mem_fun(*this, &RegionView::region_changed)); |