diff options
Diffstat (limited to 'src/PatchageEvent.cpp')
-rw-r--r-- | src/PatchageEvent.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/PatchageEvent.cpp b/src/PatchageEvent.cpp index f996495..a6b237f 100644 --- a/src/PatchageEvent.cpp +++ b/src/PatchageEvent.cpp @@ -111,13 +111,16 @@ PatchageEvent::execute(Patchage* patchage) SharedPtr<PatchageModule> module = PtrCast<PatchageModule>(port->module().lock()); assert(module); - //SharedPtr<PatchagePort> removed_port = PtrCast<PatchagePort>( - module->remove_port(port); - //assert(removed_port == port); + module->remove_port(port); + port->hide(); + if (module->num_ports() == 0) { patchage->canvas()->remove_item(module); module.reset(); + } else { + module->resize(); } + } else { cerr << "Unable to find port to destroy" << endl; } |