From 61366569033bb5ea6dda63f51dacee1bb51a2e3a Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 9 Jun 2013 05:38:24 +0000 Subject: 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 --- src/gui/PropertiesWindow.cpp | 12 ++++++++++-- 1 file 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()); 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 -- cgit v1.2.1