From b092cfc21638e4b89164f36ed708136c6cf9c8e0 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 5 May 2010 21:10:09 +0000 Subject: [PATCH] half-fix logic issue with solo-isolate controls git-svn-id: svn://localhost/ardour2/branches/3.0@7067 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/route_ui.cc | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc index 3c424f446b..70a87aebac 100644 --- a/gtk2_ardour/route_ui.cc +++ b/gtk2_ardour/route_ui.cc @@ -1074,9 +1074,14 @@ bool RouteUI::solo_isolate_button_release (GdkEventButton* ev) { bool view = (solo_isolated_led->visual_state() != 0); - cerr << _route->name() << "button release, view is " << view << " set to " << !view << endl; - _route->set_solo_isolated (!view, this); - cerr << "DONE with SSI\n"; + bool model = _route->solo_isolated(); + + /* called BEFORE the view has changed */ + + if (model == view) { + _route->set_solo_isolated (!view, this); + } + return true; } @@ -1090,7 +1095,14 @@ RouteUI::solo_safe_button_release (GdkEventButton* ev) void RouteUI::toggle_solo_isolated (Gtk::CheckMenuItem* check) { - _route->set_solo_isolated (check->get_active(), this); + bool view = check->get_active(); + bool model = _route->solo_isolated(); + + /* called AFTER the view has changed */ + + if (model != view) { + _route->set_solo_isolated (view, this); + } } void