summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/events/AddPortEvent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/engine/events/AddPortEvent.cpp')
-rw-r--r--src/libs/engine/events/AddPortEvent.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/libs/engine/events/AddPortEvent.cpp b/src/libs/engine/events/AddPortEvent.cpp
index aa7c3ca5..bdce9267 100644
--- a/src/libs/engine/events/AddPortEvent.cpp
+++ b/src/libs/engine/events/AddPortEvent.cpp
@@ -106,8 +106,8 @@ AddPortEvent::pre_process()
_ports_array = new Array<Port*>(old_num_ports + 1, NULL);
- _ports_array->at(_patch->num_ports()) = _patch_port;
- _engine.object_store()->add(_patch_port);
+ _ports_array->at(_patch->num_ports()-1) = _patch_port;
+ _patch_port->add_to_store(_engine.object_store());
if (!_patch->parent()) {
if (_type == "ingen:audio")
@@ -118,8 +118,9 @@ AddPortEvent::pre_process()
dynamic_cast<DuplexPort<MidiMessage>*>(_patch_port));
}
- assert(_patch->num_ports() == old_num_ports);
- assert(_ports_array->size() == _patch->num_ports() + 1);
+ assert(_ports_array->size() == _patch->num_ports());
+
+
}
}
QueuedEvent::pre_process();