From daf56ccf0a4d9a5209e66ce450089e4bd838bba3 Mon Sep 17 00:00:00 2001 From: Ben Loftis Date: Mon, 14 Feb 2022 20:37:58 -0600 Subject: [PATCH] tempo ruler: do not resize marker (a grabbable object) due to tempo changes --- gtk2_ardour/editor_tempodisplay.cc | 6 ------ gtk2_ardour/marker.cc | 20 -------------------- gtk2_ardour/marker.h | 1 - 3 files changed, 27 deletions(-) diff --git a/gtk2_ardour/editor_tempodisplay.cc b/gtk2_ardour/editor_tempodisplay.cc index ba5bfc781f..9474c32fca 100644 --- a/gtk2_ardour/editor_tempodisplay.cc +++ b/gtk2_ardour/editor_tempodisplay.cc @@ -302,12 +302,6 @@ Editor::draw_tempo_marks () } update_tempo_curves (min_tempo, max_tempo, sr); - - for (auto & m : tempo_marks) { - TempoMarker* tm = static_cast (m); - tm->update_height_mark ((tm->tempo().note_types_per_minute() - min_tempo) / max (10.0, max_tempo - min_tempo)); - std::cerr << "TEMPO:\n\t" << tm->tempo() << std::endl; - } } void diff --git a/gtk2_ardour/marker.cc b/gtk2_ardour/marker.cc index 0a16a3d23a..32a9555367 100644 --- a/gtk2_ardour/marker.cc +++ b/gtk2_ardour/marker.cc @@ -702,26 +702,6 @@ TempoMarker::curve() return *_curve; } -void -TempoMarker::update_height_mark (const double ratio) -{ - const double MH = marker_height - .5; - const double top = MH * (1 - ratio); - const double M3 = std::max(1.f, rintf(3.f * UIConfiguration::instance().get_ui_scale())); - const double M6 = std::max(2.f, rintf(6.f * UIConfiguration::instance().get_ui_scale())); - - delete points; - points = new ArdourCanvas::Points (); - points->push_back (ArdourCanvas::Duple ( M3, top)); - points->push_back (ArdourCanvas::Duple ( M6, min (top + (MH * .6), MH))); - points->push_back (ArdourCanvas::Duple ( M6, MH)); - points->push_back (ArdourCanvas::Duple (0.0, MH)); - points->push_back (ArdourCanvas::Duple (0.0, min (top + (MH * .6), MH))); - points->push_back (ArdourCanvas::Duple ( M3, top)); - - _pmark->set (*points); -} - void TempoMarker::reset_tempo (Temporal::TempoPoint const & t) { diff --git a/gtk2_ardour/marker.h b/gtk2_ardour/marker.h index d65d28483c..77385e87ed 100644 --- a/gtk2_ardour/marker.h +++ b/gtk2_ardour/marker.h @@ -186,7 +186,6 @@ class TempoMarker : public MetricMarker Temporal::TempoPoint const & tempo() const { return *_tempo; } Temporal::Point const & point() const; - void update_height_mark (const double ratio); TempoCurve& curve(); private: