diff options
Diffstat (limited to 'src/Patchage.cpp')
-rw-r--r-- | src/Patchage.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Patchage.cpp b/src/Patchage.cpp index e24cf04..f8f58e3 100644 --- a/src/Patchage.cpp +++ b/src/Patchage.cpp @@ -91,6 +91,13 @@ port_order(const GanvPort* a, const GanvPort* b, void* data) const PatchagePort* pa = dynamic_cast<const PatchagePort*>(Glib::wrap(a)); const PatchagePort* pb = dynamic_cast<const PatchagePort*>(Glib::wrap(b)); if (pa && pb) { + if (pa->order() && pb->order()) { + return *pa->order() - *pb->order(); + } else if (pa->order()) { + return -1; + } else if (pb->order()) { + return 1; + } return pa->name().compare(pb->name()); } return 0; |