summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_tempodisplay.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-03-18 06:07:08 +0000
committerDavid Robillard <d@drobilla.net>2007-03-18 06:07:08 +0000
commit99904735e066804358f1d0bd138a84f1e9ecda91 (patch)
tree71a924cf1660b5b00231275bd481bbd27094dd9b /gtk2_ardour/editor_tempodisplay.cc
parenteb270e70a12c410cdd98585ad25bb6d8e384a4f5 (diff)
Merged with trunk R1612.
git-svn-id: svn://localhost/ardour2/branches/midi@1614 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_tempodisplay.cc')
-rw-r--r--gtk2_ardour/editor_tempodisplay.cc28
1 files changed, 18 insertions, 10 deletions
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 <cstdio> // 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