From 208703da535752a33f439e19afe2bd8493b79d0e Mon Sep 17 00:00:00 2001 From: Ben Loftis Date: Tue, 6 Mar 2012 22:56:56 +0000 Subject: [PATCH] show loop markers when looping is initiated git-svn-id: svn://localhost/ardour2/branches/3.0@11610 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/ardour_ui.cc | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index ebfa51fdb7..184b6442d1 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -1719,7 +1719,9 @@ ARDOUR_UI::toggle_roll (bool with_abort, bool roll_out_of_bounded_mode) void ARDOUR_UI::toggle_session_auto_loop () { - if (!_session) { + Location * looploc = _session->locations()->auto_loop_location(); + + if (!_session || !looploc) { return; } @@ -1727,24 +1729,18 @@ ARDOUR_UI::toggle_session_auto_loop () if (_session->transport_rolling()) { - Location * looploc = _session->locations()->auto_loop_location(); - - if (looploc) { - _session->request_locate (looploc->start(), true); - _session->request_play_loop (false); - } + _session->request_locate (looploc->start(), true); + _session->request_play_loop (false); } else { _session->request_play_loop (false); } } else { - - Location * looploc = _session->locations()->auto_loop_location(); - - if (looploc) { - _session->request_play_loop (true); - } + _session->request_play_loop (true); } + + //show the loop markers + looploc->set_hidden (false, this); } void