summaryrefslogtreecommitdiffstats
path: root/src/libs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs')
-rw-r--r--src/libs/client/PatchModel.cpp1
-rw-r--r--src/libs/client/PatchModel.h1
-rw-r--r--src/libs/engine/QueuedEngineInterface.cpp2
-rw-r--r--src/libs/engine/QueuedEvent.h2
-rw-r--r--src/libs/engine/events/DestroyEvent.cpp5
-rw-r--r--src/libs/engine/events/DestroyEvent.h2
6 files changed, 8 insertions, 5 deletions
diff --git a/src/libs/client/PatchModel.cpp b/src/libs/client/PatchModel.cpp
index 90ffd38a..551b3d4c 100644
--- a/src/libs/client/PatchModel.cpp
+++ b/src/libs/client/PatchModel.cpp
@@ -80,6 +80,7 @@ PatchModel::remove_node(const string& name)
if (i != m_nodes.end()) {
//delete i->second;
m_nodes.erase(i);
+ removed_node_sig.emit(name);
return;
}
diff --git a/src/libs/client/PatchModel.h b/src/libs/client/PatchModel.h
index bc794d25..6b3b212f 100644
--- a/src/libs/client/PatchModel.h
+++ b/src/libs/client/PatchModel.h
@@ -71,6 +71,7 @@ public:
// Signals
sigc::signal<void, CountedPtr<NodeModel> > new_node_sig;
+ sigc::signal<void, const string& > removed_node_sig;
sigc::signal<void, CountedPtr<ConnectionModel> > new_connection_sig;
sigc::signal<void, const string&, const string& > removed_connection_sig;
diff --git a/src/libs/engine/QueuedEngineInterface.cpp b/src/libs/engine/QueuedEngineInterface.cpp
index 0734eb7a..1b50deb9 100644
--- a/src/libs/engine/QueuedEngineInterface.cpp
+++ b/src/libs/engine/QueuedEngineInterface.cpp
@@ -149,7 +149,7 @@ QueuedEngineInterface::rename(const string& old_path,
void
QueuedEngineInterface::destroy(const string& path)
{
- DestroyEvent* ev = new DestroyEvent(_responder, path);
+ DestroyEvent* ev = new DestroyEvent(_responder, this, path);
push(ev);
}
diff --git a/src/libs/engine/QueuedEvent.h b/src/libs/engine/QueuedEvent.h
index 16560aaa..0cdaacdb 100644
--- a/src/libs/engine/QueuedEvent.h
+++ b/src/libs/engine/QueuedEvent.h
@@ -70,7 +70,7 @@ protected:
: Event(responder), m_pre_processed(false), m_blocking(blocking), m_source(source)
{}
- // NULL event base (for internal events)
+ // NULL event base (for internal events only!)
QueuedEvent()
: Event(), m_pre_processed(false), m_blocking(false), m_source(NULL)
{}
diff --git a/src/libs/engine/events/DestroyEvent.cpp b/src/libs/engine/events/DestroyEvent.cpp
index 3988195a..85ec0011 100644
--- a/src/libs/engine/events/DestroyEvent.cpp
+++ b/src/libs/engine/events/DestroyEvent.cpp
@@ -35,8 +35,8 @@
namespace Om {
-DestroyEvent::DestroyEvent(CountedPtr<Responder> responder, const string& path, bool lock_mutex)
-: QueuedEvent(responder, true),
+DestroyEvent::DestroyEvent(CountedPtr<Responder> responder, QueuedEventSource* source, const string& path, bool lock_mutex)
+: QueuedEvent(responder, true, source),
m_path(path),
m_node(NULL),
m_patch_listnode(NULL),
@@ -142,6 +142,7 @@ DestroyEvent::execute(samplecount offset)
void
DestroyEvent::post_process()
{
+ assert(m_source);
m_source->unblock();
if (m_node == NULL) {
diff --git a/src/libs/engine/events/DestroyEvent.h b/src/libs/engine/events/DestroyEvent.h
index fc579bf4..8ad5deba 100644
--- a/src/libs/engine/events/DestroyEvent.h
+++ b/src/libs/engine/events/DestroyEvent.h
@@ -44,7 +44,7 @@ class DisconnectPortEvent;
class DestroyEvent : public QueuedEvent
{
public:
- DestroyEvent(CountedPtr<Responder> responder, const string& path, bool lock_mutex = true);
+ DestroyEvent(CountedPtr<Responder> responder, QueuedEventSource* source, const string& path, bool lock_mutex = true);
DestroyEvent(CountedPtr<Responder> responder, Node* node, bool lock_mutex = true);
~DestroyEvent();