X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fregion_view.cc;h=aeae3acc9a1015179a6572a11cfb650e8fd48721;hb=dab0dacc66dcc190b4408ba75e3807973582cbd6;hp=8e45b7ace05ca4d5d61a8b959dc1fea665b72526;hpb=fa701b8c065251d242342b86a54d91826d2290a0;p=ardour.git diff --git a/gtk2_ardour/region_view.cc b/gtk2_ardour/region_view.cc index 8e45b7ace0..aeae3acc9a 100644 --- a/gtk2_ardour/region_view.cc +++ b/gtk2_ardour/region_view.cc @@ -80,7 +80,7 @@ RegionView::RegionView (ArdourCanvas::Group* parent, , wait_for_data(false) , _time_converter(r->session().tempo_map(), r->position()) { - GhostRegion::CatchDeletion.connect (*this, ui_bind (&RegionView::remove_ghost, this, _1), gui_context()); + GhostRegion::CatchDeletion.connect (*this, invalidator (*this), ui_bind (&RegionView::remove_ghost, this, _1), gui_context()); } RegionView::RegionView (const RegionView& other) @@ -94,9 +94,8 @@ RegionView::RegionView (const RegionView& other) current_visible_sync_position = other.current_visible_sync_position; valid = false; _pixel_width = other._pixel_width; - _height = other._height; - GhostRegion::CatchDeletion.connect (*this, ui_bind (&RegionView::remove_ghost, this, _1), gui_context()); + GhostRegion::CatchDeletion.connect (*this, invalidator (*this), ui_bind (&RegionView::remove_ghost, this, _1), gui_context()); } RegionView::RegionView (const RegionView& other, boost::shared_ptr other_region) @@ -114,9 +113,8 @@ RegionView::RegionView (const RegionView& other, boost::shared_ptr other current_visible_sync_position = other.current_visible_sync_position; valid = false; _pixel_width = other._pixel_width; - _height = other._height; - GhostRegion::CatchDeletion.connect (*this, ui_bind (&RegionView::remove_ghost, this, _1), gui_context()); + GhostRegion::CatchDeletion.connect (*this, invalidator (*this), ui_bind (&RegionView::remove_ghost, this, _1), gui_context()); } RegionView::RegionView (ArdourCanvas::Group* parent, @@ -147,7 +145,6 @@ RegionView::init (Gdk::Color const & basic_color, bool wfd) editor = 0; valid = true; in_destructor = false; - _height = 0; wait_for_data = wfd; sync_mark = 0; sync_line = 0; @@ -181,7 +178,7 @@ RegionView::init (Gdk::Color const & basic_color, bool wfd) set_height (trackview.current_height()); - _region->PropertyChanged.connect (*this, ui_bind (&RegionView::region_changed, this, _1), gui_context()); + _region->PropertyChanged.connect (*this, invalidator (*this), ui_bind (&RegionView::region_changed, this, _1), gui_context()); group->signal_event().connect (sigc::bind (sigc::mem_fun (PublicEditor::instance(), &PublicEditor::canvas_region_view_event), group, this)); @@ -405,6 +402,17 @@ RegionView::fake_set_opaque (bool yn) set_frame_color (); } +void +RegionView::show_region_editor () +{ + if (editor == 0) { + editor = new RegionEditor (trackview.session(), region()); + } + + editor->present (); + editor->show_all(); +} + void RegionView::hide_region_editor() {