From fb54982c5ade5bee05b8d4a817d258ba89df701b Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 29 Nov 2020 00:35:02 +0100 Subject: Replace attached and detached signals with events --- src/PatchageModule.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/PatchageModule.cpp') diff --git a/src/PatchageModule.cpp b/src/PatchageModule.cpp index 3662172..d900819 100644 --- a/src/PatchageModule.cpp +++ b/src/PatchageModule.cpp @@ -60,12 +60,13 @@ PatchageModule::update_menu() if (_type == SignalDirection::duplex) { bool has_in = false; bool has_out = false; - for (auto p = begin(); p != end(); ++p) { - if ((*p)->is_input()) { + for (const auto* p : *this) { + if (p->is_input()) { has_in = true; } else { has_out = true; } + if (has_in && has_out) { _menu->items()[0].show(); // Show "Split" menu item return; -- cgit v1.2.1