diff options
author | David Robillard <d@drobilla.net> | 2012-04-23 03:55:40 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-04-23 03:55:40 +0000 |
commit | 54931cbf26c107a56cab8551802c1e5e3324310a (patch) | |
tree | f9a9d8f2fb15ad55417a4a285d6e3aefc5d9ab15 /src/gui/PatchView.cpp | |
parent | f8081ae941087ca1521d79d6ae9c30f82bcf0847 (diff) | |
download | ingen-54931cbf26c107a56cab8551802c1e5e3324310a.tar.gz ingen-54931cbf26c107a56cab8551802c1e5e3324310a.tar.bz2 ingen-54931cbf26c107a56cab8551802c1e5e3324310a.zip |
Fix polyphony widgets (fix #664).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4256 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui/PatchView.cpp')
-rw-r--r-- | src/gui/PatchView.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
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<const PatchModel> 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; |