void
Editor::draw_metric_marks (const Metrics& metrics)
{
+
+ const MeterSection *ms;
+ const TempoSection *ts;
+ char buf[64];
+
+ remove_metric_marks ();
+
for (Metrics::const_iterator i = metrics.begin(); i != metrics.end(); ++i) {
- const MeterSection *ms;
- const TempoSection *ts;
- char buf[64];
if ((ms = dynamic_cast<const MeterSection*>(*i)) != 0) {
snprintf (buf, sizeof(buf), "%g/%g", ms->beats_per_bar(), ms->note_divisor ());
}
}
+
}
void
Editor::tempo_map_changed (Change ignored)
{
- ENSURE_GUI_THREAD(bind (mem_fun(*this, &Editor::tempo_map_changed), ignored));
+ ENSURE_GUI_THREAD(bind (mem_fun(*this, &Editor::tempo_map_changed), ignored));
if (current_bbt_points) {
delete current_bbt_points;
void
Editor::redisplay_tempo ()
-{
- update_tempo_based_rulers ();
-
- remove_metric_marks ();
+{
hide_measures ();
if (session && current_bbt_points) {
- session->tempo_map().apply_with_metrics (*this, &Editor::draw_metric_marks);
draw_measures ();
+ update_tempo_based_rulers ();
}
-
}
void
return;
}
- TempoMap::BBTPointList::iterator i;
- TempoMap::BBTPointList *all_bbt_points;
+ TempoMap::BBTPointList::iterator i = current_bbt_points->begin();
+ TempoMap::BBTPoint& p = (*i);
ArdourCanvas::SimpleLine *line;
gdouble xpos, last_xpos;
uint32_t cnt;
return;
}
- all_bbt_points = session->tempo_map().get_points (leftmost_frame, leftmost_frame + current_page_frames());
-
cnt = 0;
last_xpos = 0;
gdouble last_beat = DBL_MAX;
gdouble beat_spacing = 0;
- for (i = all_bbt_points->begin(); i != all_bbt_points->end() && beat_spacing == 0; ++i) {
+ for (i = current_bbt_points->begin(); i != current_bbt_points->end() && beat_spacing == 0; ++i) {
TempoMap::BBTPoint& p = (*i);
switch (p.type) {
double x1, x2, y1, y2;
track_canvas.get_scroll_region (x1, y1, x2, y2);
- y2 = 1000000000.0f;
+ //y2 = 1000000000.0f;
- for (i = all_bbt_points->begin(); i != all_bbt_points->end(); ++i) {
+ for (i = current_bbt_points->begin(); i != current_bbt_points->end(); ++i) {
- TempoMap::BBTPoint& p = (*i);
+ p = (*i);
switch (p.type) {
case TempoMap::Bar:
}
}
- delete all_bbt_points;
-
/* the cursors are always on top of everything */
cursor_group->raise_to_top();
commit_reversible_command ();
map.dump (cerr);
+
+ session->tempo_map().apply_with_metrics (*this, &Editor::draw_metric_marks);
}
void
commit_reversible_command ();
map.dump (cerr);
+
+ session->tempo_map().apply_with_metrics (*this, &Editor::draw_metric_marks);
}
void
XMLNode &after = session->tempo_map().get_state();
session->add_command(new MementoCommand<TempoMap>(session->tempo_map(), &before, &after));
commit_reversible_command ();
+
+ session->tempo_map().apply_with_metrics (*this, &Editor::draw_metric_marks);
}
void
XMLNode &after = session->tempo_map().get_state();
session->add_command (new MementoCommand<TempoMap>(session->tempo_map(), &before, &after));
commit_reversible_command ();
+
+ session->tempo_map().apply_with_metrics (*this, &Editor::draw_metric_marks);
}
void
session->add_command(new MementoCommand<TempoMap>(session->tempo_map(), &before, &after));
commit_reversible_command ();
+ session->tempo_map().apply_with_metrics (*this, &Editor::draw_metric_marks);
+
return FALSE;
}
XMLNode &after = session->tempo_map().get_state();
session->add_command(new MementoCommand<TempoMap>(session->tempo_map(), &before, &after));
commit_reversible_command ();
+
+ session->tempo_map().apply_with_metrics (*this, &Editor::draw_metric_marks);
+
return FALSE;
}