diff options
author | David Robillard <d@drobilla.net> | 2009-05-28 22:28:05 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-05-28 22:28:05 +0000 |
commit | 304454c63ea00b57b55bc2023e1d52fb51e8ef7f (patch) | |
tree | 9f3afdc3629139c0b43a3d9dfd10fc98f376ab28 /src/engine/events | |
parent | 72e4e4c0c5c7d459f3a80e8cc9cdc755db61f23b (diff) | |
download | ingen-304454c63ea00b57b55bc2023e1d52fb51e8ef7f.tar.gz ingen-304454c63ea00b57b55bc2023e1d52fb51e8ef7f.tar.bz2 ingen-304454c63ea00b57b55bc2023e1d52fb51e8ef7f.zip |
Fix loading connections inside subpatches to patch ports.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2039 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/events')
-rw-r--r-- | src/engine/events/CreatePortEvent.cpp | 3 | ||||
-rw-r--r-- | src/engine/events/SetMetadataEvent.cpp | 27 |
2 files changed, 13 insertions, 17 deletions
diff --git a/src/engine/events/CreatePortEvent.cpp b/src/engine/events/CreatePortEvent.cpp index e954c56d..8136e3ae 100644 --- a/src/engine/events/CreatePortEvent.cpp +++ b/src/engine/events/CreatePortEvent.cpp @@ -153,9 +153,6 @@ CreatePortEvent::execute(ProcessContext& context) _engine.midi_driver()->add_port(_driver_port); } } - - if (_source) - _source->unblock(); } diff --git a/src/engine/events/SetMetadataEvent.cpp b/src/engine/events/SetMetadataEvent.cpp index 0349ba29..24dbce88 100644 --- a/src/engine/events/SetMetadataEvent.cpp +++ b/src/engine/events/SetMetadataEvent.cpp @@ -30,6 +30,7 @@ #include "CreatePatchEvent.hpp" #include "CreateNodeEvent.hpp" #include "CreatePortEvent.hpp" +#include "QueuedEventSource.hpp" using namespace std; @@ -82,7 +83,6 @@ SetMetadataEvent::pre_process() if (is_graph_object && !_object) { Path path(_subject.str()); - cerr << "CREATE NEW GRAPH OBJECT" << endl; bool is_patch = false, is_node = false, is_port = false, is_output = false; DataType data_type(DataType::UNKNOWN); ResourceImpl::type(_properties, is_patch, is_node, is_port, is_output, data_type); @@ -115,7 +115,8 @@ SetMetadataEvent::pre_process() for (Properties::iterator p = _properties.begin(); p != _properties.end(); ++p) { const Raul::URI& key = p->first; const Raul::Atom& value = p->second; - GraphObjectImpl* obj = dynamic_cast<GraphObjectImpl*>(_object); + GraphObjectImpl* obj = dynamic_cast<GraphObjectImpl*>(_object); + SpecialType op = NONE; if (obj) { if (_is_meta) obj->meta().set_property(key, value); @@ -125,11 +126,11 @@ SetMetadataEvent::pre_process() _patch = dynamic_cast<PatchImpl*>(_object); if (key.str() == "ingen:broadcast") { - _types.push_back(ENABLE_BROADCAST); + op = ENABLE_BROADCAST; } else if (_patch) { if (key.str() == "ingen:enabled") { if (value.type() == Atom::BOOL) { - _types.push_back(ENABLE); + op = ENABLE; if (value.get_bool() && !_patch->compiled_patch()) _compiled_patch = _patch->compile(); } else { @@ -137,29 +138,25 @@ SetMetadataEvent::pre_process() } } else if (key.str() == "ingen:polyphonic") { if (value.type() == Atom::BOOL) { - _types.push_back(POLYPHONIC); + op = POLYPHONIC; } else { _error = BAD_TYPE; } } else if (key.str() == "ingen:polyphony") { if (value.type() == Atom::INT) { - _types.push_back(POLYPHONY); + op = POLYPHONY; _patch->prepare_internal_poly(value.get_int32()); } else { _error = BAD_TYPE; } - } else { - _object->set_property(key, value); - _types.push_back(NONE); } - if (_error != NO_ERROR) - break; } - } else { - _types.push_back(NONE); } - _object->set_property(key, value); + if (_error != NO_ERROR) + break; + + _types.push_back(op); } QueuedEvent::pre_process(); @@ -177,6 +174,8 @@ SetMetadataEvent::execute(ProcessContext& context) if (_create_event) { QueuedEvent::execute(context); _create_event->execute(context); + if (_blocking) + _source->unblock(); return; } |