From 6a20eac6475e5fda1c047e6adc66287b7e643b83 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 21 Feb 2015 23:32:51 +0000 Subject: Order ports deterministically. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5593 a436a847-0d15-0410-975c-d299462d15a1 --- src/gui/GraphCanvas.cpp | 12 ++++++++++++ src/gui/wscript | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/gui/GraphCanvas.cpp b/src/gui/GraphCanvas.cpp index 4d1daa87..12c60638 100644 --- a/src/gui/GraphCanvas.cpp +++ b/src/gui/GraphCanvas.cpp @@ -61,6 +61,17 @@ using namespace Client; namespace GUI { +static int +port_order(const GanvPort* a, const GanvPort* b, void* data) +{ + const Port* pa = dynamic_cast(Glib::wrap(a)); + const Port* pb = dynamic_cast(Glib::wrap(b)); + if (pa && pb) { + return ((int)pa->model()->index() - (int)pb->model()->index()); + } + return 0; +} + GraphCanvas::GraphCanvas(App& app, SPtr graph, int width, @@ -159,6 +170,7 @@ GraphCanvas::GraphCanvas(App& app, show_human_names(app.world()->conf().option("human-names").get()); show_port_names(app.world()->conf().option("port-labels").get()); + set_port_order(port_order, NULL); } void diff --git a/src/gui/wscript b/src/gui/wscript index ecbf0119..fe54ad1a 100644 --- a/src/gui/wscript +++ b/src/gui/wscript @@ -9,7 +9,7 @@ def configure(conf): autowaf.check_pkg(conf, 'gtkmm-2.4', uselib_store='NEW_GTKMM', atleast_version='2.14.0', mandatory=False) autowaf.check_pkg(conf, 'ganv-1', uselib_store='GANV', - atleast_version='1.5.0', mandatory=False) + atleast_version='1.5.2', mandatory=False) if not Options.options.no_webkit: autowaf.check_pkg(conf, 'webkit-1.0', uselib_store='WEBKIT', atleast_version='1.4.0', mandatory=False) -- cgit v1.2.1