From 16c866f220847ae23012318d2c1a5023076ab5fa Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 11 Sep 2006 19:57:59 +0000 Subject: Bug fixes. git-svn-id: http://svn.drobilla.net/lad/ingen@129 a436a847-0d15-0410-975c-d299462d15a1 --- src/progs/ingenuity/NodeController.cpp | 5 ++++- src/progs/ingenuity/PatchController.cpp | 13 +++---------- src/progs/ingenuity/PatchController.h | 2 -- src/progs/ingenuity/WindowFactory.cpp | 4 ---- 4 files changed, 7 insertions(+), 17 deletions(-) (limited to 'src/progs/ingenuity') diff --git a/src/progs/ingenuity/NodeController.cpp b/src/progs/ingenuity/NodeController.cpp index 677bc8b5..641d975e 100644 --- a/src/progs/ingenuity/NodeController.cpp +++ b/src/progs/ingenuity/NodeController.cpp @@ -95,6 +95,7 @@ NodeController::NodeController(CountedPtr model) NodeController::~NodeController() { + cerr << "~NodeController()\n"; destroy_module(); } @@ -102,7 +103,9 @@ NodeController::~NodeController() void NodeController::destroy() { - delete this; + cerr << "FIXME: NODE DESTROYED\n"; + destroy_module(); // cuts reference + //delete this; } diff --git a/src/progs/ingenuity/PatchController.cpp b/src/progs/ingenuity/PatchController.cpp index 8dee4cd2..f02aa773 100644 --- a/src/progs/ingenuity/PatchController.cpp +++ b/src/progs/ingenuity/PatchController.cpp @@ -152,13 +152,6 @@ PatchController::destroy() #endif -void -PatchController::destroy() -{ - delete this; -} - - void PatchController::metadata_update(const string& key, const string& value) { @@ -179,9 +172,9 @@ PatchController::set_path(const Path& new_path) for (NodeModelMap::const_iterator i = patch_model()->nodes().begin(); i != patch_model()->nodes().end(); ++i) { const NodeModel* const nm = (*i).second.get(); - assert(nm ); + assert(nm); CountedPtr nc = PtrCast(nm->controller()); - assert(nc ); + assert(nc); nc->set_path(new_path.base() + nc->node_model()->path().name()); } @@ -376,7 +369,7 @@ PatchController::add_node(CountedPtr node) CountedPtr nc = PtrCast(ControllerFactory::get_controller(node)); assert(nc); - assert(node->controller() == nc); + assert(node->controller() == nc); // lifeline reference if (m_patch_view) { double x, y; diff --git a/src/progs/ingenuity/PatchController.h b/src/progs/ingenuity/PatchController.h index 2ee01738..e9c0d0b6 100644 --- a/src/progs/ingenuity/PatchController.h +++ b/src/progs/ingenuity/PatchController.h @@ -99,8 +99,6 @@ private: friend class ControllerFactory; PatchController(CountedPtr model); - void destroy(); - void add_node(CountedPtr object); PatchPropertiesWindow* m_properties_window; diff --git a/src/progs/ingenuity/WindowFactory.cpp b/src/progs/ingenuity/WindowFactory.cpp index 6a913663..c7d79aca 100644 --- a/src/progs/ingenuity/WindowFactory.cpp +++ b/src/progs/ingenuity/WindowFactory.cpp @@ -69,8 +69,6 @@ WindowFactory::create_new(CountedPtr patch) win->signal_delete_event().connect(sigc::bind<0>( sigc::mem_fun(this, &WindowFactory::remove), win)); - cerr << "Created window - count: " << _windows.size() << endl; - return win; } @@ -100,8 +98,6 @@ WindowFactory::remove(PatchWindow* win, GdkEventAny* ignored) delete win; - cerr << "Removed window " << win << "- count: " << _windows.size() << endl; - return true; } -- cgit v1.2.1