diff options
author | David Robillard <d@drobilla.net> | 2015-02-21 23:32:51 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2015-02-21 23:32:51 +0000 |
commit | 6a20eac6475e5fda1c047e6adc66287b7e643b83 (patch) | |
tree | 5ec2cdbc3e4fe87bdfa28260d79eff1d9c4d9309 /src/gui | |
parent | aef939ff10362285ce1ebd872518627e524917bc (diff) | |
download | ingen-6a20eac6475e5fda1c047e6adc66287b7e643b83.tar.gz ingen-6a20eac6475e5fda1c047e6adc66287b7e643b83.tar.bz2 ingen-6a20eac6475e5fda1c047e6adc66287b7e643b83.zip |
Order ports deterministically.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5593 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/GraphCanvas.cpp | 12 | ||||
-rw-r--r-- | src/gui/wscript | 2 |
2 files changed, 13 insertions, 1 deletions
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<const Port*>(Glib::wrap(a)); + const Port* pb = dynamic_cast<const Port*>(Glib::wrap(b)); + if (pa && pb) { + return ((int)pa->model()->index() - (int)pb->model()->index()); + } + return 0; +} + GraphCanvas::GraphCanvas(App& app, SPtr<const GraphModel> graph, int width, @@ -159,6 +170,7 @@ GraphCanvas::GraphCanvas(App& app, show_human_names(app.world()->conf().option("human-names").get<int32_t>()); show_port_names(app.world()->conf().option("port-labels").get<int32_t>()); + 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) |