-void
-Editor::handle_new_duration ()
-{
- if (!_session) {
- return;
- }
-
- ENSURE_GUI_THREAD (*this, &Editor::handle_new_duration)
- nframes64_t new_end = _session->current_end_frame() + (nframes64_t) floorf (current_page_frames() * 0.10f);
-
- horizontal_adjustment.set_upper (new_end / frames_per_unit);
- horizontal_adjustment.set_page_size (current_page_frames()/frames_per_unit);
-
- if (horizontal_adjustment.get_value() + _canvas_width > horizontal_adjustment.get_upper()) {
- horizontal_adjustment.set_value (horizontal_adjustment.get_upper() - _canvas_width);
- }
- //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() << ":" << endl;//DEBUG
-}