summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/libs/client/Store.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/libs/client/Store.cpp b/src/libs/client/Store.cpp
index f972c3ef..462b1475 100644
--- a/src/libs/client/Store.cpp
+++ b/src/libs/client/Store.cpp
@@ -449,14 +449,16 @@ Store::connection_patch(const Path& src_port_path, const Path& dst_port_path)
{
SharedPtr<PatchModel> patch;
- // Connection between patch ports
if (src_port_path.parent() == dst_port_path.parent())
patch = PtrCast<PatchModel>(this->object(src_port_path.parent()));
- else if (src_port_path.parent() == dst_port_path.parent().parent())
+
+ if (!patch && src_port_path.parent() == dst_port_path.parent().parent())
patch = PtrCast<PatchModel>(this->object(src_port_path.parent()));
- else if (src_port_path.parent().parent() == dst_port_path.parent())
+
+ if (!patch && src_port_path.parent().parent() == dst_port_path.parent())
patch = PtrCast<PatchModel>(this->object(dst_port_path.parent()));
- else
+
+ if (!patch)
patch = PtrCast<PatchModel>(this->object(src_port_path.parent().parent()));
if (!patch)