From 888239a83482f2f8a20aa204ca950ffe5dd6dadf Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sun, 24 Jan 2021 13:45:52 -0700 Subject: [PATCH] remove dual (x,y) version of AutomationLine::view_to_model_coord() The x-axis coordinate was never transformed or modified anyway (6.x just changed it from double to integer and back again!) --- gtk2_ardour/audio_region_view.cc | 2 +- gtk2_ardour/automation_line.cc | 16 ---------------- gtk2_ardour/automation_line.h | 1 - 3 files changed, 1 insertion(+), 18 deletions(-) diff --git a/gtk2_ardour/audio_region_view.cc b/gtk2_ardour/audio_region_view.cc index 2b7d456229..a902b253c6 100644 --- a/gtk2_ardour/audio_region_view.cc +++ b/gtk2_ardour/audio_region_view.cc @@ -1394,7 +1394,7 @@ AudioRegionView::add_gain_point_event (ArdourCanvas::Item *item, GdkEvent *ev, b /* map using gain line */ - gain_line->view_to_model_coord (mx, y); + gain_line->view_to_model_coord_y (y); /* XXX STATEFUL: can't convert to stateful diff until we can represent automation data with it. diff --git a/gtk2_ardour/automation_line.cc b/gtk2_ardour/automation_line.cc index daf2ad5cbd..08696178cf 100644 --- a/gtk2_ardour/automation_line.cc +++ b/gtk2_ardour/automation_line.cc @@ -1166,22 +1166,6 @@ AutomationLine::set_state (const XMLNode &node, int version) return alist->set_state (node, version); } -Temporal::timepos_t -AutomationLine::view_to_model_coord (double x, double& y) const -{ - view_to_model_coord_y (y); - - Temporal::timepos_t w; - -#warning NUTEMPO FIX ME ... this accepts view coordinate as double and things it can infer beats etc - - if (alist->time_domain() == Temporal::AudioTime) { - return timepos_t (samplepos_t (x)); - } - - return timepos_t (Temporal::Beats::from_double (x)); -} - void AutomationLine::view_to_model_coord_y (double& y) const { diff --git a/gtk2_ardour/automation_line.h b/gtk2_ardour/automation_line.h index 754b8dd248..4c51cd0500 100644 --- a/gtk2_ardour/automation_line.h +++ b/gtk2_ardour/automation_line.h @@ -126,7 +126,6 @@ public: std::string fraction_to_string (double) const; std::string delta_to_string (double) const; double string_to_fraction (std::string const &) const; - Temporal::timepos_t view_to_model_coord (double x, double& y) const; void view_to_model_coord_y (double &) const; Temporal::timepos_t model_to_view_coord (Evoral::ControlEvent const &, double& y) const; void model_to_view_coord_y (double &) const;