fix odd double conditional
[ardour.git] / gtk2_ardour / ardour_ui.cc
index 8ace0cee3885b92bea2ccad439c07644ab1b8a85..2ef51d80ecce420f3c6ee322d73ea0c78c1bae60 100644 (file)
 #include <sys/resource.h>
 #endif
 
+#ifdef __FreeBSD__
+#include <sys/types.h>
+#include <sys/sysctl.h>
+#endif
+
 #include <stdint.h>
 #include <fcntl.h>
 #include <signal.h>
@@ -2301,7 +2306,12 @@ ARDOUR_UI::toggle_roll (bool with_abort, bool roll_out_of_bounded_mode)
        if (affect_transport) {
                if (rolling) {
                        _session->request_stop (with_abort, true);
-               } else {
+
+               } else if (!with_abort) { /* with_abort == true means the
+                                          * command was intended to stop
+                                          * transport, not start.
+                                          */
+
                        /* the only external sync condition we can be in here
                         * would be Engine (JACK) sync, in which case we still
                         * want to do this.
@@ -5628,9 +5638,7 @@ void
 ARDOUR_UI::cancel_solo ()
 {
        if (_session) {
-               if (_session) {
-                       _session->set_controls (route_list_to_control_list (_session->get_routes(), &Stripable::solo_control), 0.0, Controllable::NoGroup);
-               }
+               _session->set_controls (route_list_to_control_list (_session->get_routes(), &Stripable::solo_control), 0.0, Controllable::NoGroup);
                _session->clear_all_solo_state (_session->get_routes()); // safeguard, ideally this won't do anything, check the log-window
        }
 }