diff options
Diffstat (limited to 'src/libs/engine')
-rw-r--r-- | src/libs/engine/events/CreateNodeEvent.cpp | 8 | ||||
-rw-r--r-- | src/libs/engine/events/DestroyEvent.cpp | 34 |
2 files changed, 22 insertions, 20 deletions
diff --git a/src/libs/engine/events/CreateNodeEvent.cpp b/src/libs/engine/events/CreateNodeEvent.cpp index ab9c6eaf..9a882209 100644 --- a/src/libs/engine/events/CreateNodeEvent.cpp +++ b/src/libs/engine/events/CreateNodeEvent.cpp @@ -135,8 +135,12 @@ CreateNodeEvent::post_process() _responder->respond_error(msg); } else if (_node == NULL) { msg = "Unable to load node "; - msg.append(_path).append(" (you're missing the plugin \"").append( - _plugin_uri); + msg += _path + " (you're missing the plugin "; + if (_plugin_uri != "") + msg += _plugin_uri; + else + msg += _plugin_lib + ":" + _plugin_label + " (" + _plugin_type + ")"; + msg += ")"; _responder->respond_error(msg); } else { _responder->respond_ok(); diff --git a/src/libs/engine/events/DestroyEvent.cpp b/src/libs/engine/events/DestroyEvent.cpp index 4f2cba3f..9a235807 100644 --- a/src/libs/engine/events/DestroyEvent.cpp +++ b/src/libs/engine/events/DestroyEvent.cpp @@ -36,16 +36,16 @@ namespace Ingen { DestroyEvent::DestroyEvent(Engine& engine, SharedPtr<Responder> responder, FrameTime time, QueuedEventSource* source, const string& path, bool block) -: QueuedEvent(engine, responder, time, source, source), - _path(path), - _store_iterator(engine.object_store()->objects().end()), - _driver_port(NULL), - _patch_node_listnode(NULL), - _patch_port_listnode(NULL), - _ports_array(NULL), - _compiled_patch(NULL), - _disconnect_node_event(NULL), - _disconnect_port_event(NULL) + : QueuedEvent(engine, responder, time, source, source) + , _path(path) + , _store_iterator(engine.object_store()->objects().end()) + , _driver_port(NULL) + , _patch_node_listnode(NULL) + , _patch_port_listnode(NULL) + , _ports_array(NULL) + , _compiled_patch(NULL) + , _disconnect_node_event(NULL) + , _disconnect_port_event(NULL) { assert(_source); } @@ -167,13 +167,15 @@ DestroyEvent::execute(ProcessContext& context) void DestroyEvent::post_process() { - if (_store_iterator != _engine.object_store()->objects().end()) { + if (_node || _port) { _engine.broadcaster()->send_destroyed(_path); } else { - if (_path == "/") + if (_path == "/") { _responder->respond_error("You can not destroy the root patch (/)"); - else - _responder->respond_error("Could not find object to destroy"); + } else { + string msg = string("Could not find object ") + _path + " to destroy"; + _responder->respond_error(msg); + } } if (_patch_node_listnode) { @@ -184,8 +186,6 @@ DestroyEvent::post_process() _disconnect_node_event->post_process(); _engine.broadcaster()->send_destroyed(_path); _engine.maid()->push(_patch_node_listnode); - //_engine.maid()->push(_node); - _node.reset(); } else if (_patch_port_listnode) { assert(_port); _responder->respond_ok(); @@ -193,8 +193,6 @@ DestroyEvent::post_process() _disconnect_port_event->post_process(); _engine.broadcaster()->send_destroyed(_path); _engine.maid()->push(_patch_port_listnode); - //_engine.maid()->push(_port); - _port.reset(); } else { _responder->respond_error("Unable to destroy object"); } |