- draw_measures (begin, end);
- update_tempo_based_rulers (begin, end);
+ draw_measures (grid);
+ update_tempo_based_rulers (grid);
+}
+
+void
+Editor::marker_position_changed ()
+{
+ if (!_session) {
+ return;
+ }
+
+ ENSURE_GUI_THREAD (*this, &Editor::tempo_map_changed);
+
+ if (tempo_lines) {
+ tempo_lines->tempo_map_changed();
+ }
+ TempoMarker* tempo_marker;
+ MeterMarker* meter_marker;
+ const TempoSection *ts;
+ const MeterSection *ms;
+
+ for (Marks::iterator x = metric_marks.begin(); x != metric_marks.end(); ++x) {
+ if ((tempo_marker = dynamic_cast<TempoMarker*> (*x)) != 0) {
+ if ((ts = &tempo_marker->tempo()) != 0) {
+ tempo_marker->set_position (ts->frame ());
+ }
+ }
+ if ((meter_marker = dynamic_cast<MeterMarker*> (*x)) != 0) {
+ if ((ms = &meter_marker->meter()) != 0) {
+ meter_marker->set_position (ms->frame ());
+ }
+ }
+ }
+ std::vector<TempoMap::BBTPoint> grid;
+ compute_current_bbt_points (grid, leftmost_frame, leftmost_frame + current_page_samples());
+ draw_measures (grid);
+ update_tempo_based_rulers (grid);