tempo ruler: do not resize marker (a grabbable object) due to tempo changes
This commit is contained in:
parent
111054812a
commit
daf56ccf0a
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue