summaryrefslogtreecommitdiffstats
path: root/src/progs/gtk
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-06-19 06:17:49 +0000
committerDavid Robillard <d@drobilla.net>2006-06-19 06:17:49 +0000
commit2db1897709eba0e80677bd09e8444e7320e15120 (patch)
tree8062b5ede632c1c084a2c3b43bbd1a3d9991734e /src/progs/gtk
parent4adc4f4a2b4f57f43affcd48f2c01c60f471b20a (diff)
downloadingen-2db1897709eba0e80677bd09e8444e7320e15120.tar.gz
ingen-2db1897709eba0e80677bd09e8444e7320e15120.tar.bz2
ingen-2db1897709eba0e80677bd09e8444e7320e15120.zip
Connecting of patch ports internally (seemingly anyway, data not flowing yet)
git-svn-id: http://svn.drobilla.net/lad/grauph@61 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/progs/gtk')
-rw-r--r--src/progs/gtk/PatchController.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/progs/gtk/PatchController.cpp b/src/progs/gtk/PatchController.cpp
index d9b22e35..ae604bae 100644
--- a/src/progs/gtk/PatchController.cpp
+++ b/src/progs/gtk/PatchController.cpp
@@ -390,10 +390,19 @@ PatchController::show_properties_window()
void
PatchController::create_connection(CountedPtr<ConnectionModel> cm)
{
+ // Deal with messy anonymous nodes for this patch's own ports...
+ const Path& src_parent_path = cm->src_port_path().parent();
+ const Path& dst_parent_path = cm->dst_port_path().parent();
+
+ const string& src_parent_name =
+ (src_parent_path == path()) ? "" : src_parent_path.name();
+ const string& dst_parent_name =
+ (dst_parent_path == path()) ? "" : dst_parent_path.name();
+
m_patch_view->canvas()->add_connection(
- cm->src_port_path().parent().name(),
+ src_parent_name,
cm->src_port_path().name(),
- cm->dst_port_path().parent().name(),
+ dst_parent_name,
cm->dst_port_path().name());
// Disable control slider from destination node control window