From 0dc0913b72007da6f9d62213fe0515a9505fc137 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 5 Apr 2012 00:41:57 +0000 Subject: Fix wonky controls when plugin GUI is open (fix #822). git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4141 a436a847-0d15-0410-975c-d299462d15a1 --- src/gui/Port.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/gui/Port.cpp b/src/gui/Port.cpp index 752501a7..3e021840 100644 --- a/src/gui/Port.cpp +++ b/src/gui/Port.cpp @@ -147,15 +147,18 @@ Port::on_value_changed(const Glib::VariantBase& value) const Glib::Variant& fvalue = Glib::VariantBase::cast_dynamic < Glib::Variant >(value); - const float fval = fvalue.get(); - Ingen::Shared::World* const world = _app.world(); - _app.engine()->set_property(model()->path(), - world->uris()->ingen_value, - _app.forge().make(fval)); + + const Raul::Atom atom = _app.forge().make((float)fvalue.get()); + if (atom != model()->value()) { + Ingen::Shared::World* const world = _app.world(); + _app.engine()->set_property(model()->path(), + world->uris()->ingen_value, + atom); + } PatchBox* box = get_patch_box(); if (box) { - box->show_port_status(model().get(), _app.forge().make(fval)); + box->show_port_status(model().get(), atom); } } -- cgit v1.2.1