mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
Move CC/Automation regions with parent correctly.
git-svn-id: svn://localhost/ardour2/trunk@2363 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
34907a7d62
commit
299b58ebf8
3 changed files with 30 additions and 1 deletions
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue