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 | |
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')
-rw-r--r-- | src/gui/PatchView.cpp | 10 | ||||
-rw-r--r-- | src/gui/PropertiesWindow.cpp | 3 |
2 files changed, 10 insertions, 3 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; diff --git a/src/gui/PropertiesWindow.cpp b/src/gui/PropertiesWindow.cpp index 5294a5cf..0540b7e1 100644 --- a/src/gui/PropertiesWindow.cpp +++ b/src/gui/PropertiesWindow.cpp @@ -123,10 +123,9 @@ PropertiesWindow::create_value_widget(const Raul::URI& uri, const Raul::Atom& va if (value.type() == forge.Int) { Gtk::SpinButton* widget = manage(new Gtk::SpinButton(0.0, 0)); widget->property_numeric() = true; - widget->set_value(value.get_int32()); - widget->set_snap_to_ticks(true); widget->set_range(INT_MIN, INT_MAX); widget->set_increments(1, 10); + widget->set_value(value.get_int32()); widget->signal_value_changed().connect(sigc::bind( sigc::mem_fun(this, &PropertiesWindow::value_edited), uri)); |