diff options
-rw-r--r-- | gtk2_ardour/automation_region_view.cc | 17 | ||||
-rw-r--r-- | gtk2_ardour/automation_region_view.h | 4 | ||||
-rw-r--r-- | gtk2_ardour/region_view.cc | 10 |
3 files changed, 30 insertions, 1 deletions
diff --git a/gtk2_ardour/automation_region_view.cc b/gtk2_ardour/automation_region_view.cc index 885a42b5ea..51650e94ae 100644 --- a/gtk2_ardour/automation_region_view.cc +++ b/gtk2_ardour/automation_region_view.cc @@ -33,6 +33,17 @@ AutomationRegionView::AutomationRegionView(ArdourCanvas::Group* _line.show_all_control_points(); group->raise_to_top (); + + group->signal_event().connect (mem_fun (this, &AutomationRegionView::canvas_event), false); +} + + +bool +AutomationRegionView::canvas_event(GdkEvent* ev) +{ + cerr << "AUTOMATION EVENT" << endl; + + return false; } @@ -44,6 +55,12 @@ AutomationRegionView::set_y_position_and_height (double y, double h) _line.set_y_position_and_height ((uint32_t)y, (uint32_t) rint (h - NAME_HIGHLIGHT_SIZE)); } +void +AutomationRegionView::region_resized (ARDOUR::Change what_changed) +{ + // Do nothing, parent will move us +} + void AutomationRegionView::entered() diff --git a/gtk2_ardour/automation_region_view.h b/gtk2_ardour/automation_region_view.h index fc152f6796..ba75b2fecb 100644 --- a/gtk2_ardour/automation_region_view.h +++ b/gtk2_ardour/automation_region_view.h @@ -51,7 +51,9 @@ public: virtual GhostRegion* add_ghost(AutomationTimeAxisView&) { return NULL; } protected: - void set_y_position_and_height (double y, double h); + void set_y_position_and_height(double y, double h); + void region_resized(ARDOUR::Change what_changed); + bool canvas_event(GdkEvent* ev); void entered(); void exited(); diff --git a/gtk2_ardour/region_view.cc b/gtk2_ardour/region_view.cc index 04e2bf8850..0554cc4141 100644 --- a/gtk2_ardour/region_view.cc +++ b/gtk2_ardour/region_view.cc @@ -315,6 +315,11 @@ RegionView::set_position (nframes_t pos, void* src, double* ignored) for (vector<GhostRegion*>::iterator i = ghosts.begin(); i != ghosts.end(); ++i) { (*i)->group->move (delta, 0.0); } + + for (AutomationChildren::iterator i = _automation_children.begin(); + i != _automation_children.end(); ++i) { + i->second->get_canvas_group()->move(delta, 0.0); + } } return ret; @@ -495,6 +500,11 @@ RegionView::move (double x_delta, double y_delta) for (vector<GhostRegion*>::iterator i = ghosts.begin(); i != ghosts.end(); ++i) { (*i)->group->move (x_delta, 0.0); } + + for (AutomationChildren::iterator i = _automation_children.begin(); + i != _automation_children.end(); ++i) { + i->second->get_canvas_group()->move(x_delta, 0.0); + } } void |