From a8fafe5adeb6f1782b40d1766d4cb1cf9c3f89d9 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 12 Jan 2007 18:45:59 +0000 Subject: Close control windows on node destruction. git-svn-id: http://svn.drobilla.net/lad/ingen@254 a436a847-0d15-0410-975c-d299462d15a1 --- src/progs/ingenuity/NodeModule.cpp | 12 ++++++++++++ src/progs/ingenuity/NodeModule.h | 2 +- src/progs/ingenuity/WindowFactory.cpp | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) (limited to 'src/progs/ingenuity') diff --git a/src/progs/ingenuity/NodeModule.cpp b/src/progs/ingenuity/NodeModule.cpp index 95ab69e1..41041b0e 100644 --- a/src/progs/ingenuity/NodeModule.cpp +++ b/src/progs/ingenuity/NodeModule.cpp @@ -28,6 +28,7 @@ #include "PatchWindow.h" #include "WindowFactory.h" #include "SubpatchModule.h" +#include "NodeControlWindow.h" namespace Ingenuity { @@ -49,6 +50,17 @@ NodeModule::NodeModule(boost::shared_ptr canvas, SharedPtrcontrol_window(m_node); + + if (win) { + // Should remove from window factory via signal + delete win; + } +} + + boost::shared_ptr NodeModule::create(boost::shared_ptr canvas, SharedPtr node) { diff --git a/src/progs/ingenuity/NodeModule.h b/src/progs/ingenuity/NodeModule.h index 12012f97..2d6802ff 100644 --- a/src/progs/ingenuity/NodeModule.h +++ b/src/progs/ingenuity/NodeModule.h @@ -53,7 +53,7 @@ class NodeModule : public boost::enable_shared_from_this, public Lib public: static boost::shared_ptr create (boost::shared_ptr canvas, SharedPtr node); - virtual ~NodeModule() {} + virtual ~NodeModule(); boost::shared_ptr port(const string& port_name) { return boost::dynamic_pointer_cast( diff --git a/src/progs/ingenuity/WindowFactory.cpp b/src/progs/ingenuity/WindowFactory.cpp index c9ec9040..865a84df 100644 --- a/src/progs/ingenuity/WindowFactory.cpp +++ b/src/progs/ingenuity/WindowFactory.cpp @@ -234,6 +234,7 @@ WindowFactory::remove_control_window(NodeControlWindow* win, GdkEventAny* ignore return true; } + void WindowFactory::present_load_plugin(SharedPtr patch, MetadataMap data) { -- cgit v1.2.1