From 83d4890ff4e267bc9a99cb3b560204169dabbc02 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 18 Dec 2010 21:17:35 +0000 Subject: 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 --- src/PatchageEvent.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/PatchageEvent.cpp') 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); -- cgit v1.2.1