summaryrefslogtreecommitdiffstats
path: root/src/PatchageEvent.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-07-24 23:10:43 +0000
committerDavid Robillard <d@drobilla.net>2007-07-24 23:10:43 +0000
commit35b1c7c0683a72978f646c883f411e1eabd595ae (patch)
treeeff7d5e6048ed320916ec9a2f11768200361cec3 /src/PatchageEvent.cpp
parent560fac6a42644bd7584db5f53db19c936ef50ab0 (diff)
downloadpatchage-35b1c7c0683a72978f646c883f411e1eabd595ae.tar.gz
patchage-35b1c7c0683a72978f646c883f411e1eabd595ae.tar.bz2
patchage-35b1c7c0683a72978f646c883f411e1eabd595ae.zip
Possibly fix overlapping MIDI ports (fix ticket 10).
git-svn-id: http://svn.drobilla.net/lad/patchage@616 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/PatchageEvent.cpp')
-rw-r--r--src/PatchageEvent.cpp9
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;
}