diff options
-rw-r--r-- | src/gui/Port.cpp | 9 | ||||
-rw-r--r-- | src/gui/Port.hpp | 2 |
2 files changed, 4 insertions, 7 deletions
diff --git a/src/gui/Port.cpp b/src/gui/Port.cpp index 3e021840..a6b72ace 100644 --- a/src/gui/Port.cpp +++ b/src/gui/Port.cpp @@ -138,17 +138,14 @@ Port::moved() } void -Port::on_value_changed(const Glib::VariantBase& value) +Port::on_value_changed(GVariant* value) { - if (!value.is_of_type(Glib::VARIANT_TYPE_DOUBLE)) { + if (!g_variant_is_of_type(value, G_VARIANT_TYPE_DOUBLE)) { Raul::warn << "TODO: Non-float port value changed." << std::endl; return; } - const Glib::Variant<double>& fvalue = Glib::VariantBase::cast_dynamic - < Glib::Variant<double> >(value); - - const Raul::Atom atom = _app.forge().make((float)fvalue.get()); + const Raul::Atom atom = _app.forge().make(float(g_variant_get_double(value))); if (atom != model()->value()) { Ingen::Shared::World* const world = _app.world(); _app.engine()->set_property(model()->path(), diff --git a/src/gui/Port.hpp b/src/gui/Port.hpp index 5d02dc51..bbf4e7c7 100644 --- a/src/gui/Port.hpp +++ b/src/gui/Port.hpp @@ -75,7 +75,7 @@ private: void property_changed(const Raul::URI& key, const Raul::Atom& value); void moved(); - void on_value_changed(const Glib::VariantBase& value); + void on_value_changed(GVariant* value); bool on_event(GdkEvent* ev); //static ArtVpathDash* _dash; |