From 54931cbf26c107a56cab8551802c1e5e3324310a Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 23 Apr 2012 03:55:40 +0000 Subject: Fix polyphony widgets (fix #664). git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4256 a436a847-0d15-0410-975c-d299462d15a1 --- src/gui/PatchView.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/gui/PatchView.cpp') diff --git a/src/gui/PatchView.cpp b/src/gui/PatchView.cpp index 605bef6b..07af108b 100644 --- a/src/gui/PatchView.cpp +++ b/src/gui/PatchView.cpp @@ -78,6 +78,8 @@ PatchView::set_patch(SharedPtr patch) _canvas_scrolledwindow->add(_canvas->widget()); + _poly_spin->set_range(1, 128); + _poly_spin->set_increments(1, 4); _poly_spin->set_value(patch->internal_poly()); for (GraphObject::Properties::const_iterator i = patch->properties().begin(); @@ -190,7 +192,13 @@ PatchView::property_changed(const Raul::URI& predicate, const Raul::Atom& value) if (value.type() == _app->uris().forge.Bool) { _process_but->set_active(value.get_bool()); } else { - warn << "Bad type for ingen:enabled variable: " << value.type() << endl; + warn << "Bad type for ingen:enabled: " << value.type() << endl; + } + } else if (predicate == _app->uris().ingen_polyphony) { + if (value.type() == _app->uris().forge.Int) { + _poly_spin->set_value(value.get_int32()); + } else { + warn << "Bad type for ingen:polyphony: " << value.type() << endl; } } _enable_signal = true; -- cgit v1.2.1