summaryrefslogtreecommitdiffstats
path: root/src/libs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs')
-rw-r--r--src/libs/engine/PatchImpl.cpp2
-rw-r--r--src/libs/gui/PatchCanvas.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/libs/engine/PatchImpl.cpp b/src/libs/engine/PatchImpl.cpp
index 97f9dde3..9f0ae701 100644
--- a/src/libs/engine/PatchImpl.cpp
+++ b/src/libs/engine/PatchImpl.cpp
@@ -348,7 +348,7 @@ PatchImpl::create_port(const string& name, DataType type, size_t buffer_size, bo
assert( !(type == DataType::UNKNOWN) );
- return new DuplexPort(this, name, 0, _polyphony, type, Atom(), buffer_size, is_output);
+ return new DuplexPort(this, name, num_ports(), _polyphony, type, Atom(), buffer_size, is_output);
}
diff --git a/src/libs/gui/PatchCanvas.cpp b/src/libs/gui/PatchCanvas.cpp
index a588671e..f527041b 100644
--- a/src/libs/gui/PatchCanvas.cpp
+++ b/src/libs/gui/PatchCanvas.cpp
@@ -665,13 +665,13 @@ PatchCanvas::menu_add_control(ControlType type)
void
PatchCanvas::menu_add_port(const string& name, const string& type, bool is_output)
{
- // FIXME: bundleify
const Path& path = _patch->path().base() + generate_port_name(name);
- // FIXME: index
- App::instance().engine()->new_port(path, 0, type, is_output);
+ App::instance().engine()->bundle_begin();
+ App::instance().engine()->new_port(path, _patch->num_ports(), type, is_output);
GraphObject::Variables data = get_initial_data();
for (GraphObject::Variables::const_iterator i = data.begin(); i != data.end(); ++i)
App::instance().engine()->set_variable(path, i->first, i->second);
+ App::instance().engine()->bundle_end();
}