#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;
+unsigned int RouteProcessorSelection::_no_route_change_signal = 0;
RouteProcessorSelection::RouteProcessorSelection()
- : _no_route_change_signal (false)
{
}
}
axes.clear ();
drop_connections ();
- if (!_no_route_change_signal) {
+ if (0 == _no_route_change_signal) {
RoutesChanged ();
}
}
ms->CatchDeletion.connect (*this, invalidator (*this), boost::bind (&RouteProcessorSelection::remove, this, _1), gui_context());
}
- if (!_no_route_change_signal) {
+ if (0 == _no_route_change_signal) {
RoutesChanged();
}
}
if ((i = find (axes.begin(), axes.end(), r)) != axes.end()) {
(*i)->set_selected (false);
axes.erase (i);
- if (!_no_route_change_signal) {
+ if (0 == _no_route_change_signal) {
RoutesChanged ();
}
}
void
RouteProcessorSelection::block_routes_changed (bool yn)
{
- _no_route_change_signal = yn;
+ if (yn) {
+ ++_no_route_change_signal;
+ } else {
+ assert (_no_route_change_signal > 0);
+ --_no_route_change_signal;
+ }
}