From 99904735e066804358f1d0bd138a84f1e9ecda91 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 18 Mar 2007 06:07:08 +0000 Subject: Merged with trunk R1612. git-svn-id: svn://localhost/ardour2/branches/midi@1614 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/editor_tempodisplay.cc | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) (limited to 'gtk2_ardour/editor_tempodisplay.cc') diff --git a/gtk2_ardour/editor_tempodisplay.cc b/gtk2_ardour/editor_tempodisplay.cc index 8aa978a79c..ae2bda903e 100644 --- a/gtk2_ardour/editor_tempodisplay.cc +++ b/gtk2_ardour/editor_tempodisplay.cc @@ -15,7 +15,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id$ */ #include // for sprintf, grrr @@ -94,13 +93,13 @@ Editor::draw_metric_marks (const Metrics& metrics) } void -Editor::tempo_map_changed (Change ignored) +Editor::tempo_map_changed (Change ignored, bool immediate_redraw) { if (!session) { return; } - ENSURE_GUI_THREAD(bind (mem_fun(*this, &Editor::tempo_map_changed), ignored)); + ENSURE_GUI_THREAD(bind (mem_fun (*this, &Editor::tempo_map_changed), ignored, immediate_redraw)); BBT_Time previous_beat, next_beat; // the beats previous to the leftmost frame and after the rightmost frame @@ -135,18 +134,27 @@ Editor::tempo_map_changed (Change ignored) current_bbt_points = 0; } - redisplay_tempo (); + if (immediate_redraw) { + + hide_measures (); + + if (session && current_bbt_points) { + draw_measures (); + } + + } else { + + if (session && current_bbt_points) { + Glib::signal_idle().connect (mem_fun (*this, &Editor::lazy_hide_and_draw_measures)); + } else { + hide_measures (); + } + } } void Editor::redisplay_tempo () { - - if (session && current_bbt_points) { - Glib::signal_idle().connect (mem_fun (*this, &Editor::lazy_hide_and_draw_measures)); - } else { - hide_measures (); - } } void -- cgit v1.2.3