diff options
-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)); |