diff options
author | David Robillard <d@drobilla.net> | 2007-04-11 03:46:40 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-04-11 03:46:40 +0000 |
commit | 72a21b5dbe82ac726f4d7a4308601d802001d9c0 (patch) | |
tree | 2d10c530c7dd278898db65a56e0a56754d73660d /src/libs/engine/events/ConnectionEvent.cpp | |
parent | fa10838af240f0457097051eb2e4153772a44386 (diff) | |
download | ingen-72a21b5dbe82ac726f4d7a4308601d802001d9c0.tar.gz ingen-72a21b5dbe82ac726f4d7a4308601d802001d9c0.tar.bz2 ingen-72a21b5dbe82ac726f4d7a4308601d802001d9c0.zip |
Serialization (both saving and restoring) of nested patches.
Serialization of patch (float) metadata.
Removed useless cruft from Save dialog.
Remember filename on save to avoid save as next time.
git-svn-id: http://svn.drobilla.net/lad/ingen@437 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/events/ConnectionEvent.cpp')
-rw-r--r-- | src/libs/engine/events/ConnectionEvent.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/libs/engine/events/ConnectionEvent.cpp b/src/libs/engine/events/ConnectionEvent.cpp index af35265b..7c4b4422 100644 --- a/src/libs/engine/events/ConnectionEvent.cpp +++ b/src/libs/engine/events/ConnectionEvent.cpp @@ -84,16 +84,14 @@ ConnectionEvent::pre_process() return; } - /*if ( !( _src_port->is_output() && _dst_port->is_input() ) ) { - _error = TYPE_MISMATCH; - QueuedEvent::pre_process(); - return; - }*/ - _dst_input_port = dynamic_cast<InputPort*>(_dst_port); _src_output_port = dynamic_cast<OutputPort*>(_src_port); - assert(_src_output_port); - assert(_dst_input_port); + + if (!_dst_input_port || !_src_output_port) { + _error = DIRECTION_MISMATCH; + QueuedEvent::pre_process(); + return; + } if (_dst_input_port->is_connected_to(_src_output_port)) { _error = ALREADY_CONNECTED; |