diff options
author | David Robillard <d@drobilla.net> | 2011-11-27 06:33:35 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-11-27 06:33:35 +0000 |
commit | f158d5a094288602b2663f114d39d287245ebe71 (patch) | |
tree | d36963bbace825db6505d70d2af1401d464d5588 | |
parent | bcbd762544c0a67d3c3dab1dd0afd438bdf58fba (diff) | |
download | patchage-f158d5a094288602b2663f114d39d287245ebe71.tar.gz patchage-f158d5a094288602b2663f114d39d287245ebe71.tar.bz2 patchage-f158d5a094288602b2663f114d39d287245ebe71.zip |
Remove linear searching for connections.
Remove redundant connection lists stored in Connectable.
Add arrange and straight connections options to flowcanvas_bench.
Add Connection::set_curved().
git-svn-id: http://svn.drobilla.net/lad/trunk/patchage@3652 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r-- | src/AlsaDriver.cpp | 2 | ||||
-rw-r--r-- | src/JackDriver.cpp | 2 | ||||
-rw-r--r-- | src/PatchageCanvas.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/AlsaDriver.cpp b/src/AlsaDriver.cpp index 6374f0f..7ddb3d1 100644 --- a/src/AlsaDriver.cpp +++ b/src/AlsaDriver.cpp @@ -162,7 +162,7 @@ AlsaDriver::refresh() continue; PatchagePort* port2 = _app->canvas()->find_port(PortID(*addr2, true)); - if (port2 && !port->is_connected_to(port2)) { + if (port2 && !_app->canvas()->get_connection(port, port2)) { _app->canvas()->make_connection(port, port2, port->color() + 0x22222200); diff --git a/src/JackDriver.cpp b/src/JackDriver.cpp index 7d1394d..e2e6d2b 100644 --- a/src/JackDriver.cpp +++ b/src/JackDriver.cpp @@ -312,7 +312,7 @@ JackDriver::refresh() dst = port1; } - if (src && dst && !src->is_connected_to(dst)) + if (src && dst && !_app->canvas()->get_connection(src, dst)) _app->canvas()->make_connection(src, dst, port1->color() + 0x22222200); } diff --git a/src/PatchageCanvas.cpp b/src/PatchageCanvas.cpp index ea2318b..73a3d26 100644 --- a/src/PatchageCanvas.cpp +++ b/src/PatchageCanvas.cpp @@ -278,7 +278,7 @@ bool PatchageCanvas::on_event(GdkEvent* ev) { if (ev->type == GDK_KEY_PRESS && ev->key.keyval == GDK_Delete) { - Connections cs = selected_connections(); + SelectedConnections cs = selected_connections(); clear_selection(); for (Connections::const_iterator i = cs.begin(); i != cs.end(); ++i) { |