summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mainsbridge <beatroute@iprimus.com.au>2008-10-23 13:24:14 +0000
committerNick Mainsbridge <beatroute@iprimus.com.au>2008-10-23 13:24:14 +0000
commit12ffa283905d46bac16462b5199da1b7645d4e2a (patch)
tree0c6fbde5875bdf52eaa9d74e6e77e27b17339d8c
parente5cfd1924ae8d6f5aef276d0014b1a90f82ef5eb (diff)
Reinstate ZoomFocusMenu and KeyMouseActions, fix odd horizontal scroller behaviour (thanks dooooomi).
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@4000 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--gtk2_ardour/editor.cc19
-rw-r--r--gtk2_ardour/editor_actions.cc2
2 files changed, 10 insertions, 11 deletions
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc
index 63026a0d59..02d33a4c11 100644
--- a/gtk2_ardour/editor.cc
+++ b/gtk2_ardour/editor.cc
@@ -4331,6 +4331,7 @@ Editor::set_frames_per_unit (double fpu)
void
Editor::post_zoom ()
{
+ nframes64_t cef=0;
/*
// convert fpu to frame count
@@ -4361,6 +4362,12 @@ Editor::post_zoom ()
ZoomChanged (); /* EMIT_SIGNAL */
reset_hscrollbar_stepping ();
+
+ if (session) {
+ cef = session->current_end_frame() + (current_page_frames() / 10);// Add a little extra so we can see the end marker
+ }
+ horizontal_adjustment.set_upper (cef / frames_per_unit);
+
//reset_scrolling_region ();
instant_save ();
@@ -4409,21 +4416,11 @@ Editor::idle_visual_changer ()
if (p & VisualChange::TimeOrigin) {
- nframes64_t csf=0, cef=0;
nframes64_t current_time_origin = (nframes64_t) floor (horizontal_adjustment.get_value() * frames_per_unit);
- if (session) {
- csf = session->current_start_frame();
- cef = session->current_end_frame();
- }
-
- /* if we seek beyond the current end of the canvas, move the end */
+ horizontal_adjustment.set_value (pending_visual_change.time_origin / frames_per_unit);
if (current_time_origin != pending_visual_change.time_origin) {
- cef += current_page_frames() / 10; // Add a little extra so we can see the end marker
- horizontal_adjustment.set_upper (cef / frames_per_unit);
- horizontal_adjustment.set_value (pending_visual_change.time_origin / frames_per_unit);
- } else {
update_fixed_rulers();
redisplay_tempo (true);
}
diff --git a/gtk2_ardour/editor_actions.cc b/gtk2_ardour/editor_actions.cc
index ee43b1d057..4b3410d123 100644
--- a/gtk2_ardour/editor_actions.cc
+++ b/gtk2_ardour/editor_actions.cc
@@ -57,6 +57,8 @@ Editor::register_actions ()
ActionManager::register_action (editor_actions, X_("LatchMenu"), _("Latch"));
ActionManager::register_action (editor_actions, X_("Layering"), _("Layering"));
ActionManager::register_action (editor_actions, X_("Link"), _("Link"));
+ ActionManager::register_action (editor_actions, X_("ZoomFocusMenu"), _("Zoom Focus"));
+ ActionManager::register_action (editor_actions, X_("KeyMouseActions"), _("Key Mouse"));
ActionManager::register_action (editor_actions, X_("LocateToMarker"), _("Locate To Markers"));
ActionManager::register_action (editor_actions, X_("MarkerMenu"), _("Markers"));
ActionManager::register_action (editor_actions, X_("MeterFalloff"), _("Meter falloff"));