tempo ruler: do not resize marker (a grabbable object) due to tempo changes

This commit is contained in:
Ben Loftis 2022-02-14 20:37:58 -06:00
parent 111054812a
commit daf56ccf0a
3 changed files with 0 additions and 27 deletions

View File

@ -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<TempoMarker*> (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

View File

@ -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)
{

View File

@ -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: