From 4de1556353332eeb98a50bf46a51771702231bd4 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 15 Oct 2006 03:29:39 +0000 Subject: Fixed patch ports and some bugs. git-svn-id: http://svn.drobilla.net/lad/ingen@172 a436a847-0d15-0410-975c-d299462d15a1 --- src/progs/ingenuity/NodeControlWindow.cpp | 3 --- src/progs/ingenuity/PatchPortModule.cpp | 14 ++++++++------ src/progs/ingenuity/PatchPortModule.h | 4 ++-- src/progs/ingenuity/ingenuity.glade | 2 +- 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/progs/ingenuity/NodeControlWindow.cpp b/src/progs/ingenuity/NodeControlWindow.cpp index bd93e749..78574196 100644 --- a/src/progs/ingenuity/NodeControlWindow.cpp +++ b/src/progs/ingenuity/NodeControlWindow.cpp @@ -50,9 +50,6 @@ NodeControlWindow::NodeControlWindow(SharedPtr node, size_t poly) show_all_children(); resize(); - // FIXME: not working - //set_icon_from_file(string(PKGDATADIR) + "/om-icon.png"); - m_callback_enabled = true; } diff --git a/src/progs/ingenuity/PatchPortModule.cpp b/src/progs/ingenuity/PatchPortModule.cpp index 6da63805..315aacab 100644 --- a/src/progs/ingenuity/PatchPortModule.cpp +++ b/src/progs/ingenuity/PatchPortModule.cpp @@ -41,11 +41,9 @@ PatchPortModule::PatchPortModule(boost::shared_ptr canvas, SharedPt assert(canvas); assert(port); - //if (PtrCast(port->parent())) { - // m_patch_port = boost::shared_ptr(new Port(shared_from_this(), port, true)); - //} - - resize(); + assert(PtrCast(port->parent())); + + /*resize(); const Atom& x_atom = port->get_metadata("ingenuity:canvas-x"); const Atom& y_atom = port->get_metadata("ingenuity:canvas-y"); @@ -57,7 +55,7 @@ PatchPortModule::PatchPortModule(boost::shared_ptr canvas, SharedPt double default_y; canvas->get_new_module_location(default_x, default_y); move_to(default_x, default_y); - } + }*/ port->metadata_update_sig.connect(sigc::mem_fun(this, &PatchPortModule::metadata_update)); } @@ -68,10 +66,14 @@ PatchPortModule::create(boost::shared_ptr canvas, SharedPtr ret = boost::shared_ptr( new PatchPortModule(canvas, port)); + assert(ret); for (MetadataMap::const_iterator m = port->metadata().begin(); m != port->metadata().end(); ++m) ret->metadata_update(m->first, m->second); + ret->m_patch_port = boost::shared_ptr(new Port(ret->shared_from_this(), port, true)); + ret->add_port(ret->m_patch_port); + ret->resize(); return ret; diff --git a/src/progs/ingenuity/PatchPortModule.h b/src/progs/ingenuity/PatchPortModule.h index 89a9ce68..516d912d 100644 --- a/src/progs/ingenuity/PatchPortModule.h +++ b/src/progs/ingenuity/PatchPortModule.h @@ -44,7 +44,7 @@ class Port; * * \ingroup Ingenuity */ -class PatchPortModule : public LibFlowCanvas::Module//, public boost::enable_shared_from_this +class PatchPortModule : public boost::enable_shared_from_this, public LibFlowCanvas::Module { public: static boost::shared_ptr create (boost::shared_ptr canvas, @@ -66,7 +66,7 @@ protected: void metadata_update(const string& key, const Atom& value); - SharedPtr m_port; + SharedPtr m_port; boost::shared_ptr m_patch_port; ///< Port on this 'anonymous' module }; diff --git a/src/progs/ingenuity/ingenuity.glade b/src/progs/ingenuity/ingenuity.glade index a41ae758..684bbd0c 100644 --- a/src/progs/ingenuity/ingenuity.glade +++ b/src/progs/ingenuity/ingenuity.glade @@ -3207,7 +3207,7 @@ Contributors: Usability / UI Design: Thorsten Wilms translator-credits - om-icon.png + ingen-icon.png -- cgit v1.2.1