diff options
author | David Robillard <d@drobilla.net> | 2013-06-09 05:38:24 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2013-06-09 05:38:24 +0000 |
commit | 61366569033bb5ea6dda63f51dacee1bb51a2e3a (patch) | |
tree | 989f8d0f9daa042e9ac47674f72ed7c6850fd3ff /src | |
parent | fe81cb8af20ecbe721eba55d53fa62c5e2041421 (diff) | |
download | ingen-61366569033bb5ea6dda63f51dacee1bb51a2e3a.tar.gz ingen-61366569033bb5ea6dda63f51dacee1bb51a2e3a.tar.bz2 ingen-61366569033bb5ea6dda63f51dacee1bb51a2e3a.zip |
Fix zero minimum for float property values (#895).
Fix odd crash bug introduced in r5138.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5140 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/PropertiesWindow.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gui/PropertiesWindow.cpp b/src/gui/PropertiesWindow.cpp index 50332c65..719b22cf 100644 --- a/src/gui/PropertiesWindow.cpp +++ b/src/gui/PropertiesWindow.cpp @@ -234,7 +234,7 @@ PropertiesWindow::create_value_widget(const Raul::URI& uri, const Atom& value) Gtk::SpinButton* widget = manage(new Gtk::SpinButton(0.0, 4)); widget->property_numeric() = true; widget->set_snap_to_ticks(false); - widget->set_range(DBL_MIN, DBL_MAX); + widget->set_range(-FLT_MAX, FLT_MAX); widget->set_value(value.get<float>()); widget->set_increments(0.1, 1.0); widget->signal_value_changed().connect(sigc::bind( @@ -333,7 +333,15 @@ PropertiesWindow::property_removed(const Raul::URI& predicate, const Atom& value) { // Bleh, there doesn't seem to be an easy way to remove a Gtk::Table row... - set_object(_model); + _records.clear(); + _table->children().clear(); + _table->resize(1, 3); + _table->property_n_rows() = 1; + + for (const auto& p : _model->properties()) { + add_property(p.first, p.second); + } + _table->show_all(); } void |