diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-04-09 18:53:51 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-04-09 18:53:51 +0000 |
commit | bef3ea1adc83945be416f755e08cdea2ecfabf29 (patch) | |
tree | 52fbb8075de9a26dcc33a1dca786f2c9dbd3e485 /gtk2_ardour/editor_ops.cc | |
parent | 0431309f89dfaf7c17ee65c23a9c694336987098 (diff) |
MCP: F1-7 jump to a given view; F8 closes any currently open dialog; in zoom mode, up/down alter vertical track height of all tracks; option-up/down alters selected track heights
git-svn-id: svn://localhost/ardour2/branches/3.0@11858 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_ops.cc')
-rw-r--r-- | gtk2_ardour/editor_ops.cc | 44 |
1 files changed, 41 insertions, 3 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index 1dbad3ac2e..92d4ed63f5 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -1278,11 +1278,17 @@ Editor::scroll_tracks_up_line () void Editor::tav_zoom_step (bool coarser) { - ENSURE_GUI_THREAD (*this, &Editor::temporal_zoom_step, coarser) - _routes->suspend_redisplay (); - for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) { + TrackViewList* ts; + + if (selection->tracks.empty()) { + ts = &track_views; + } else { + ts = &selection->tracks; + } + + for (TrackViewList::iterator i = ts->begin(); i != ts->end(); ++i) { TimeAxisView *tv = (static_cast<TimeAxisView*>(*i)); tv->step_height (coarser); } @@ -1291,6 +1297,38 @@ Editor::tav_zoom_step (bool coarser) } void +Editor::tav_zoom_smooth (bool coarser, bool force_all) +{ + _routes->suspend_redisplay (); + + TrackViewList* ts; + + if (selection->tracks.empty() || force_all) { + ts = &track_views; + } else { + ts = &selection->tracks; + } + + for (TrackViewList::iterator i = ts->begin(); i != ts->end(); ++i) { + TimeAxisView *tv = (static_cast<TimeAxisView*>(*i)); + uint32_t h = tv->current_height (); + + if (coarser) { + if (h > 5) { + h -= 5; // pixels + if (h >= TimeAxisView::preset_height (HeightSmall)) { + tv->set_height (h); + } + } + } else { + tv->set_height (h + 5); + } + } + + _routes->resume_redisplay (); +} + +void Editor::temporal_zoom_step (bool coarser) { ENSURE_GUI_THREAD (*this, &Editor::temporal_zoom_step, coarser) |