update all marker positions after a tempo map change

This commit is contained in:
Paul Davis 2023-07-15 10:44:44 -06:00
parent 422fa7255b
commit b8af596a92
4 changed files with 14 additions and 1 deletions

View File

@ -789,6 +789,7 @@ private:
void ensure_cd_marker_updated (LocationMarkers* lam, ARDOUR::Location* location);
void update_cue_marker_display ();
void ensure_cue_marker_updated (LocationMarkers* lam, ARDOUR::Location* location);
void update_all_marker_lanes ();
TimeAxisView* clicked_axisview;
RouteTimeAxisView* clicked_routeview;

View File

@ -336,6 +336,17 @@ struct MarkerComparator {
}
};
void
Editor::update_all_marker_lanes ()
{
for (auto & lam : location_markers) {
lam.second->start->reposition ();
if (lam.second->end) {
lam.second->end->reposition ();
}
}
}
/** Update all marker labels in all groups */
void
Editor::update_marker_labels ()

View File

@ -343,6 +343,7 @@ Editor::tempo_map_changed ()
reset_metric_marks ();
update_tempo_based_rulers ();
update_all_marker_lanes ();
maybe_draw_grid_lines ();
}

View File

@ -91,6 +91,7 @@ public:
void set_show_line (bool);
void set_line_height (double);
virtual void reposition ();
virtual void set_position (Temporal::timepos_t const &);
void set_name (const std::string&, const std::string & tooltip = std::string());
void set_color (std::string const& color_name);
@ -163,7 +164,6 @@ protected:
int _cue_index;
virtual void reposition ();
void setup_line_x ();
void setup_name_display ();