diff options
author | David Robillard <d@drobilla.net> | 2015-02-22 04:33:15 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2015-02-22 04:33:15 +0000 |
commit | b8e8ee68c7507bcabb0fb7a5476b83f503be0ca3 (patch) | |
tree | 92c4cda22324fa49d0209ecdf93c3e643dbe4276 /src/Patchage.cpp | |
parent | d0b8f2a3a5dc1bde35e72f6dffd65b6da861fc6e (diff) | |
download | patchage-b8e8ee68c7507bcabb0fb7a5476b83f503be0ca3.tar.gz patchage-b8e8ee68c7507bcabb0fb7a5476b83f503be0ca3.tar.bz2 patchage-b8e8ee68c7507bcabb0fb7a5476b83f503be0ca3.zip |
Support Jack port order metadata.
git-svn-id: http://svn.drobilla.net/lad/trunk/patchage@5598 a436a847-0d15-0410-975c-d299462d15a1
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; |