diff options
author | Nick Mainsbridge <beatroute@iprimus.com.au> | 2006-09-10 17:49:03 +0000 |
---|---|---|
committer | Nick Mainsbridge <beatroute@iprimus.com.au> | 2006-09-10 17:49:03 +0000 |
commit | dc9484d1449d04923849316a3ac7c74c4c49ec23 (patch) | |
tree | c9cf1a22cdfeba67abf8f26f8f5467dee3b18d78 /gtk2_ardour/editor_canvas.cc | |
parent | 3c45ab08468e552b1c6f2b5bd6dff2b74204a0b9 (diff) |
more fiddling about with placing bits of the scroll/zoom operation in the idle callback. fix some ruler bugs. overall this should be smoother.
git-svn-id: svn://localhost/ardour2/trunk@912 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_canvas.cc')
-rw-r--r-- | gtk2_ardour/editor_canvas.cc | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/gtk2_ardour/editor_canvas.cc b/gtk2_ardour/editor_canvas.cc index 946df13334..0c3436ec40 100644 --- a/gtk2_ardour/editor_canvas.cc +++ b/gtk2_ardour/editor_canvas.cc @@ -266,8 +266,10 @@ Editor::initialize_canvas () edit_cursor = new Cursor (*this, "blue", &Editor::canvas_edit_cursor_event); playhead_cursor = new Cursor (*this, "red", &Editor::canvas_playhead_cursor_event); - + + initial_ruler_update_required = true; track_canvas.signal_size_allocate().connect (mem_fun(*this, &Editor::track_canvas_allocate)); + } void @@ -317,10 +319,15 @@ Editor::track_canvas_allocate (Gtk::Allocation alloc) transport_punchout_line->property_y2() = canvas_height; } - update_fixed_rulers (); - - if (is_visible()) { + if (is_visible() && initial_ruler_update_required) { + /* + this is really dumb, but signal_size_allocate() gets emitted intermittently + depending on whether the canvas contents are visible or not. + we only want to do this once + */ + update_fixed_rulers(); tempo_map_changed (Change (0)); + initial_ruler_update_required = false; } Resized (); /* EMIT_SIGNAL */ |