summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mainsbridge <beatroute@iprimus.com.au>2008-10-17 16:28:27 +0000
committerNick Mainsbridge <beatroute@iprimus.com.au>2008-10-17 16:28:27 +0000
commit9b49147d3ad92f7a9343bdd2a5637c4d349df421 (patch)
tree40ee4abde43605b138fc929f6ed2ed9e7d69f72a
parent6f6e729427f8ddca8afc931dba12bafe4dc61e4f (diff)
Fix invisible end marker on load/zoom.
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3980 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--gtk2_ardour/editor.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc
index 8e8222f061..51bf6ef9a1 100644
--- a/gtk2_ardour/editor.cc
+++ b/gtk2_ardour/editor.cc
@@ -1121,15 +1121,14 @@ Editor::handle_new_duration ()
ENSURE_GUI_THREAD (mem_fun (*this, &Editor::handle_new_duration));
- nframes64_t new_end = session->get_maximum_extent() + (nframes64_t) floorf (current_page_frames() * 0.10f);
-
+ nframes64_t new_end = session->current_end_frame() - session->current_start_frame() + (nframes64_t) floorf (current_page_frames() * 0.10f);
+
if (new_end > last_canvas_frame) {
last_canvas_frame = new_end;
horizontal_adjustment.set_upper (last_canvas_frame / frames_per_unit);
horizontal_adjustment.set_page_size (current_page_frames()/frames_per_unit);
//reset_scrolling_region ();
}
-
horizontal_adjustment.set_value (leftmost_frame/frames_per_unit);
//cerr << "Editor::handle_new_duration () called ha v:l:u:ps:lcf = " << horizontal_adjustment.get_value() << ":" << horizontal_adjustment.get_lower() << ":" << horizontal_adjustment.get_upper() << ":" << horizontal_adjustment.get_page_size() << ":" << last_canvas_frame << endl;//DEBUG
}
@@ -3783,7 +3782,8 @@ Editor::end_location_changed (Location* location)
{
ENSURE_GUI_THREAD (bind (mem_fun(*this, &Editor::end_location_changed), location));
//reset_scrolling_region ();
- horizontal_adjustment.set_upper ( location->start());
+ nframes64_t session_span = location->start() + (nframes64_t) floorf (current_page_frames() * 0.10f);
+ horizontal_adjustment.set_upper (session_span / frames_per_unit);
}
int
@@ -4408,7 +4408,7 @@ Editor::idle_visual_changer ()
if (session) {
csf = session->current_start_frame();
- cef = session->current_end_frame() + (current_page_frames() / 24);// Add a little extra so we can see the end marker
+ cef = session->current_end_frame() + (current_page_frames() / 10);// Add a little extra so we can see the end marker
}
/* if we seek beyond the current end of the canvas, move the end */