add an example script to show/hide TAVs
[ardour.git] / gtk2_ardour / route_processor_selection.cc
index ed993fdc86bfe01fe1d77de5eb7ff10ee31865de..ab512d3bb1e1d92ea17450ef51adc698cbb90af7 100644 (file)
 #include "route_processor_selection.h"
 #include "route_ui.h"
 
-#include "i18n.h"
+#include "pbd/i18n.h"
 
 using namespace std;
 using namespace ARDOUR;
 using namespace PBD;
 
+
 RouteProcessorSelection::RouteProcessorSelection()
-       : _no_route_change_signal (false)
 {
 }
 
@@ -71,14 +71,13 @@ RouteProcessorSelection::clear_processors ()
 void
 RouteProcessorSelection::clear_routes ()
 {
+       PresentationInfo::ChangeSuspender cs;
+
        for (AxisViewSelection::iterator i = axes.begin(); i != axes.end(); ++i) {
                (*i)->set_selected (false);
        }
        axes.clear ();
        drop_connections ();
-       if (!_no_route_change_signal) {
-               RoutesChanged ();
-       }
 }
 
 void
@@ -109,10 +108,6 @@ RouteProcessorSelection::add (AxisView* r)
                if (ms) {
                        ms->CatchDeletion.connect (*this, invalidator (*this), boost::bind (&RouteProcessorSelection::remove, this, _1), gui_context());
                }
-
-               if (!_no_route_change_signal) {
-                       RoutesChanged();
-               }
        }
 }
 
@@ -120,14 +115,12 @@ void
 RouteProcessorSelection::remove (AxisView* r)
 {
        ENSURE_GUI_THREAD (*this, &RouteProcessorSelection::remove, r);
+       PresentationInfo::ChangeSuspender cs;
 
        AxisViewSelection::iterator i;
        if ((i = find (axes.begin(), axes.end(), r)) != axes.end()) {
                (*i)->set_selected (false);
                axes.erase (i);
-               if (!_no_route_change_signal) {
-                       RoutesChanged ();
-               }
        }
 }
 
@@ -149,9 +142,3 @@ RouteProcessorSelection::empty ()
 {
        return processors.empty () && axes.empty ();
 }
-
-void
-RouteProcessorSelection::block_routes_changed (bool yn)
-{
-       _no_route_change_signal = yn;
-}