diff options
author | David Robillard <d@drobilla.net> | 2020-11-29 00:35:02 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-11-29 00:35:02 +0100 |
commit | fb54982c5ade5bee05b8d4a817d258ba89df701b (patch) | |
tree | 287934e43f3e0dfab6bc6cf9295a0b080bd7f707 /src/PatchageModule.cpp | |
parent | 395362edbd8cd4ff08f3c29f3ae36d7d20229f21 (diff) | |
download | patchage-fb54982c5ade5bee05b8d4a817d258ba89df701b.tar.gz patchage-fb54982c5ade5bee05b8d4a817d258ba89df701b.tar.bz2 patchage-fb54982c5ade5bee05b8d4a817d258ba89df701b.zip |
Replace attached and detached signals with events
Diffstat (limited to 'src/PatchageModule.cpp')
-rw-r--r-- | src/PatchageModule.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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; |