+ if ((auto_return_enabled || synced_to_jack() || _requested_return_frame >= 0) &&
+ !(ptw & PostTransportLocate)) {
+
+ /* no explicit locate queued */
+
+ bool do_locate = false;
+
+ if (_requested_return_frame >= 0) {
+
+ /* explicit return request pre-queued in event list. overrides everything else */
+
+ cerr << "explicit auto-return to " << _requested_return_frame << endl;
+
+ _transport_frame = _requested_return_frame;
+ do_locate = true;
+
+ } else {
+ if (config.get_auto_return()) {
+
+ if (play_loop) {
+
+ /* don't try to handle loop play when synced to JACK */
+
+ if (!synced_to_jack()) {
+
+ Location *location = _locations.auto_loop_location();
+
+ if (location != 0) {
+ _transport_frame = location->start();
+ } else {
+ _transport_frame = _last_roll_location;
+ }
+ do_locate = true;
+ }
+
+ } else if (_play_range) {
+
+ /* return to start of range */