summaryrefslogtreecommitdiffstats
path: root/src/PatchageCanvas.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-12-05 23:48:39 +0000
committerDavid Robillard <d@drobilla.net>2011-12-05 23:48:39 +0000
commit3fed69e2ebb44d369a1226aa68fd2d4b2cf34d1c (patch)
treed4d440486152a32f35274b66b4e6e8e12d7277c7 /src/PatchageCanvas.cpp
parent997b406e7d71e335c62e7e1f5f0f87303b121b17 (diff)
downloadpatchage-3fed69e2ebb44d369a1226aa68fd2d4b2cf34d1c.tar.gz
patchage-3fed69e2ebb44d369a1226aa68fd2d4b2cf34d1c.tar.bz2
patchage-3fed69e2ebb44d369a1226aa68fd2d4b2cf34d1c.zip
Remove cruft.
git-svn-id: http://svn.drobilla.net/lad/trunk/patchage@3811 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/PatchageCanvas.cpp')
-rw-r--r--src/PatchageCanvas.cpp18
1 files changed, 3 insertions, 15 deletions
diff --git a/src/PatchageCanvas.cpp b/src/PatchageCanvas.cpp
index d20add5..7021d89 100644
--- a/src/PatchageCanvas.cpp
+++ b/src/PatchageCanvas.cpp
@@ -68,7 +68,6 @@ PatchageCanvas::remove_module(const string& name)
{
ModuleIndex::iterator i = _module_index.find(name);
while (i != _module_index.end()) {
- delete i->second;
_module_index.erase(i);
i = _module_index.find(name);
}
@@ -335,28 +334,17 @@ PatchageCanvas::make_connection(FlowCanvas::Node* tail,
return true;
}
-bool
-PatchageCanvas::remove_item(FlowCanvasNode* i)
+void
+PatchageCanvas::remove_module(PatchageModule* module)
{
- // Remove item from canvas
- const bool ret = FlowCanvas::Canvas::remove_item(i);
- if (!ret)
- return ret;
-
- PatchageModule* const module = dynamic_cast<PatchageModule*>(Glib::wrap(i));
- if (!module)
- return ret;
-
// Remove module from cache
for (ModuleIndex::iterator i = _module_index.find(module->get_label());
i != _module_index.end() && i->first == module->get_label(); ++i) {
if (i->second == module) {
_module_index.erase(i);
- return true;
+ return;
}
}
-
- return ret;
}
void