summaryrefslogtreecommitdiffstats
path: root/src/PatchageEvent.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-12-18 21:17:35 +0000
committerDavid Robillard <d@drobilla.net>2010-12-18 21:17:35 +0000
commit83d4890ff4e267bc9a99cb3b560204169dabbc02 (patch)
tree5e1cc422b6d9c0327d54a0f271bfe2f52a92c5c1 /src/PatchageEvent.cpp
parentcb4f0b60531d6311ca61f2959111c53fbd348cdc (diff)
downloadpatchage-83d4890ff4e267bc9a99cb3b560204169dabbc02.tar.gz
patchage-83d4890ff4e267bc9a99cb3b560204169dabbc02.tar.bz2
patchage-83d4890ff4e267bc9a99cb3b560204169dabbc02.zip
Remove pointless empty module resize.
Print error if removing module from canvas fails. git-svn-id: http://svn.drobilla.net/lad/trunk/patchage@2767 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/PatchageEvent.cpp')
-rw-r--r--src/PatchageEvent.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/PatchageEvent.cpp b/src/PatchageEvent.cpp
index cef39f2..520b136 100644
--- a/src/PatchageEvent.cpp
+++ b/src/PatchageEvent.cpp
@@ -92,12 +92,12 @@ PatchageEvent::execute(Patchage* patchage)
assert(module);
module->remove_port(port);
- patchage->enqueue_resize(module);
port.reset();
// No empty modules (for now)
if (module->num_ports() == 0) {
- patchage->canvas()->remove_item(module);
+ if (!patchage->canvas()->remove_item(module))
+ Raul::error << "Failed to remove module `" << module->name() << "'" << endl;
module.reset();
} else {
patchage->enqueue_resize(module);