summaryrefslogtreecommitdiffstats
path: root/src/progs
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-01-12 18:45:59 +0000
committerDavid Robillard <d@drobilla.net>2007-01-12 18:45:59 +0000
commita8fafe5adeb6f1782b40d1766d4cb1cf9c3f89d9 (patch)
treeb3d7d3f31ce782227ff9fe4c23877ee590e59b37 /src/progs
parent0b5e45ec738086206b159e239a0801ea5bccb09f (diff)
downloadingen-a8fafe5adeb6f1782b40d1766d4cb1cf9c3f89d9.tar.gz
ingen-a8fafe5adeb6f1782b40d1766d4cb1cf9c3f89d9.tar.bz2
ingen-a8fafe5adeb6f1782b40d1766d4cb1cf9c3f89d9.zip
Close control windows on node destruction.
git-svn-id: http://svn.drobilla.net/lad/ingen@254 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/progs')
-rw-r--r--src/progs/ingenuity/NodeModule.cpp12
-rw-r--r--src/progs/ingenuity/NodeModule.h2
-rw-r--r--src/progs/ingenuity/WindowFactory.cpp1
3 files changed, 14 insertions, 1 deletions
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<PatchCanvas> canvas, SharedPtr<NodeMode
}
+NodeModule::~NodeModule()
+{
+ NodeControlWindow* win = App::instance().window_factory()->control_window(m_node);
+
+ if (win) {
+ // Should remove from window factory via signal
+ delete win;
+ }
+}
+
+
boost::shared_ptr<NodeModule>
NodeModule::create(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<NodeModel> 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<NodeModule>, public Lib
public:
static boost::shared_ptr<NodeModule> create (boost::shared_ptr<PatchCanvas> canvas, SharedPtr<NodeModel> node);
- virtual ~NodeModule() {}
+ virtual ~NodeModule();
boost::shared_ptr<Port> port(const string& port_name) {
return boost::dynamic_pointer_cast<Ingenuity::Port>(
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<PatchModel> patch, MetadataMap data)
{