summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/ObjectSender.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/engine/ObjectSender.cpp')
-rw-r--r--src/libs/engine/ObjectSender.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/libs/engine/ObjectSender.cpp b/src/libs/engine/ObjectSender.cpp
index f51f0ad0..fff2a797 100644
--- a/src/libs/engine/ObjectSender.cpp
+++ b/src/libs/engine/ObjectSender.cpp
@@ -33,9 +33,21 @@ namespace Ingen {
void
ObjectSender::send_patch(ClientInterface* client, const PatchImpl* patch, bool recursive)
{
+ client->bundle_begin();
+
client->new_patch(patch->path(), patch->internal_polyphony());
client->polyphonic(patch->path(), patch->polyphonic());
+ // Send variable
+ const GraphObjectImpl::Variables& data = patch->variables();
+ for (GraphObjectImpl::Variables::const_iterator j = data.begin(); j != data.end(); ++j)
+ client->variable_change(patch->path(), (*j).first, (*j).second);
+
+ if (patch->enabled())
+ client->patch_enabled(patch->path());
+
+ client->bundle_end();
+
if (recursive) {
// Send nodes
@@ -60,14 +72,6 @@ ObjectSender::send_patch(ClientInterface* client, const PatchImpl* patch, bool r
client->connection((*j)->src_port_path(), (*j)->dst_port_path());
}
-
- // Send variable
- const GraphObjectImpl::Variables& data = patch->variables();
- for (GraphObjectImpl::Variables::const_iterator j = data.begin(); j != data.end(); ++j)
- client->variable_change(patch->path(), (*j).first, (*j).second);
-
- if (patch->enabled())
- client->patch_enabled(patch->path());
}