diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2008-02-26 16:34:45 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2008-02-26 16:34:45 +0000 |
commit | 295b2da733f3080c2a96219bb169829ef4a2c0ce (patch) | |
tree | 18de158244b08b78866592bb05af3a45586ed865 /gtk2_ardour/audio_clock.cc | |
parent | c25149cfe247ebbe552eccd6b9e8d3a92d870671 (diff) |
non-AA canvas support (not used by default); new SAE menus; fix locate-play-locate ; add toggle-punch ; use primary clock for verbose cursor mode at all the right times; minimize clock redrawing part one
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3123 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/audio_clock.cc')
-rw-r--r-- | gtk2_ardour/audio_clock.cc | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/gtk2_ardour/audio_clock.cc b/gtk2_ardour/audio_clock.cc index c05f2a00c0..b00a4c9214 100644 --- a/gtk2_ardour/audio_clock.cc +++ b/gtk2_ardour/audio_clock.cc @@ -501,15 +501,21 @@ AudioClock::set_frames (nframes_t when, bool force) sprintf (buf, "%.3fK", rate/1000.0f); } - frames_upper_info_label->set_text (buf); + if (frames_upper_info_label->get_text() != buf) { + frames_upper_info_label->set_text (buf); + } float vid_pullup = Config->get_video_pullup(); if (vid_pullup == 0.0) { - frames_lower_info_label->set_text(_("none")); + if (frames_lower_info_label->get_text () != _("none")) { + frames_lower_info_label->set_text(_("none")); + } } else { sprintf (buf, "%-6.4f", vid_pullup); - frames_lower_info_label->set_text (buf); + if (frames_lower_info_label->get_text() != buf) { + frames_lower_info_label->set_text (buf); + } } } } @@ -599,7 +605,9 @@ AudioClock::set_smpte (nframes_t when, bool force) sprintf (buf, "%.2f", smpte_frames); } - smpte_upper_info_label->set_text (buf); + if (smpte_upper_info_label->get_text() != buf) { + smpte_upper_info_label->set_text (buf); + } if ((fabs(smpte_frames - 29.97) < 0.0001) || smpte_frames == 30) { if (session->smpte_drop_frames()) { @@ -612,7 +620,9 @@ AudioClock::set_smpte (nframes_t when, bool force) buf[0] = '\0'; } - smpte_lower_info_label->set_text (buf); + if (smpte_lower_info_label->get_text() != buf) { + smpte_lower_info_label->set_text (buf); + } } } @@ -633,9 +643,13 @@ AudioClock::set_bbt (nframes_t when, bool force) if (bbt_upper_info_label) { TempoMap::Metric m (session->tempo_map().metric_at (when)); sprintf (buf, "%-5.2f", m.tempo().beats_per_minute()); - bbt_lower_info_label->set_text (buf); + if (bbt_lower_info_label->get_text() != buf) { + bbt_lower_info_label->set_text (buf); + } sprintf (buf, "%g|%g", m.meter().beats_per_bar(), m.meter().note_divisor()); - bbt_upper_info_label->set_text (buf); + if (bbt_upper_info_label->get_text() != buf) { + bbt_upper_info_label->set_text (buf); + } } } |