summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_ops.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2007-12-20 19:54:54 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2007-12-20 19:54:54 +0000
commit5c0d10e63a5987b3c6795551152c862766928cd8 (patch)
tree9b94ca2412a448e6909e09bdb8b810a311f65e0f /gtk2_ardour/editor_ops.cc
parenta5a0da468616cc7f25cdb86137ae9321cee7aef0 (diff)
change behaviour of play-at-edit-point....; fix crash in SAE context with automation button; new SAE logos etc
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2801 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_ops.cc')
-rw-r--r--gtk2_ardour/editor_ops.cc23
1 files changed, 8 insertions, 15 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc
index dc170e938f..5ec2d5da6f 100644
--- a/gtk2_ardour/editor_ops.cc
+++ b/gtk2_ardour/editor_ops.cc
@@ -2124,23 +2124,16 @@ Editor::play_from_edit_point_and_return ()
nframes64_t start_frame;
nframes64_t return_frame;
- if (session->transport_rolling()) {
- session->request_stop ();
- return;
+ /* don't reset the return frame if its already set */
+
+ if ((return_frame = session->requested_return_frame()) < 0) {
+ return_frame = session->audible_frame();
}
- switch (_edit_point) {
- case EditAtPlayhead:
- session->request_transport_speed (1.0f);
- break;
-
- default:
- return_frame = session->transport_frame();
- start_frame = get_preferred_edit_position ();
- if (start_frame >= 0) {
- session->request_roll_at_and_return (start_frame, return_frame);
- }
- break;
+ start_frame = get_preferred_edit_position (true);
+
+ if (start_frame >= 0) {
+ session->request_roll_at_and_return (start_frame, return_frame);
}
}