Make region gain envelope drawing work again.
git-svn-id: svn://localhost/ardour2/branches/3.0@4339 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
e9a9fe30cf
commit
510d6d6dd3
@ -1004,8 +1004,8 @@ AudioRegionView::add_gain_point_event (ArdourCanvas::Item *item, GdkEvent *ev)
|
|||||||
|
|
||||||
/* compute vertical fractional position */
|
/* compute vertical fractional position */
|
||||||
|
|
||||||
y = 1.0 - (y / (trackview.current_height() - NAME_HIGHLIGHT_SIZE));
|
y = 1.0 - (y / (_height - NAME_HIGHLIGHT_SIZE));
|
||||||
|
|
||||||
/* map using gain line */
|
/* map using gain line */
|
||||||
|
|
||||||
gain_line->view_to_model_y (y);
|
gain_line->view_to_model_y (y);
|
||||||
|
@ -84,7 +84,8 @@ AutomationLine::AutomationLine (const string& name, TimeAxisView& tv, ArdourCanv
|
|||||||
|
|
||||||
trackview.session().register_with_memento_command_factory(alist->id(), this);
|
trackview.session().register_with_memento_command_factory(alist->id(), this);
|
||||||
|
|
||||||
if (alist->parameter().type() == GainAutomation) {
|
if (alist->parameter().type() == GainAutomation ||
|
||||||
|
alist->parameter().type() == EnvelopeAutomation) {
|
||||||
set_uses_gain_mapping (true);
|
set_uses_gain_mapping (true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1245,7 +1246,8 @@ void
|
|||||||
AutomationLine::view_to_model_y (double& y) const
|
AutomationLine::view_to_model_y (double& y) const
|
||||||
{
|
{
|
||||||
/* TODO: This should be more generic ... */
|
/* TODO: This should be more generic ... */
|
||||||
if (alist->parameter().type() == GainAutomation) {
|
if (alist->parameter().type() == GainAutomation ||
|
||||||
|
alist->parameter().type() == EnvelopeAutomation) {
|
||||||
y = slider_position_to_gain (y);
|
y = slider_position_to_gain (y);
|
||||||
y = max (0.0, y);
|
y = max (0.0, y);
|
||||||
y = min (2.0, y);
|
y = min (2.0, y);
|
||||||
@ -1263,7 +1265,8 @@ void
|
|||||||
AutomationLine::model_to_view_y (double& y) const
|
AutomationLine::model_to_view_y (double& y) const
|
||||||
{
|
{
|
||||||
/* TODO: This should be more generic ... */
|
/* TODO: This should be more generic ... */
|
||||||
if (alist->parameter().type() == GainAutomation) {
|
if (alist->parameter().type() == GainAutomation ||
|
||||||
|
alist->parameter().type() == EnvelopeAutomation) {
|
||||||
y = gain_to_slider_position (y);
|
y = gain_to_slider_position (y);
|
||||||
} else if (alist->parameter().type() == PanAutomation) {
|
} else if (alist->parameter().type() == PanAutomation) {
|
||||||
// vertical coordinate axis reversal
|
// vertical coordinate axis reversal
|
||||||
|
Loading…
Reference in New Issue
Block a user