From 2c03f2abd3d3d98a81020438ca805acded39dbab Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 24 Jan 2014 04:47:33 +0000 Subject: Remove redundant and unnecessary properties from saved graphs and protocol. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5321 a436a847-0d15-0410-975c-d299462d15a1 --- src/gui/PortMenu.cpp | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) (limited to 'src/gui/PortMenu.cpp') diff --git a/src/gui/PortMenu.cpp b/src/gui/PortMenu.cpp index 9c428dd8..138ee397 100644 --- a/src/gui/PortMenu.cpp +++ b/src/gui/PortMenu.cpp @@ -121,22 +121,14 @@ PortMenu::on_menu_set_max() void PortMenu::on_menu_reset_range() { - const URIs& uris = _app->uris(); - SPtr model = dynamic_ptr_cast(_object); - SPtr parent = dynamic_ptr_cast(_object->parent()); - - float min, max; - parent->default_port_value_range(model, min, max); - - if (!std::isnan(min)) - _app->interface()->set_property(_object->uri(), - uris.lv2_minimum, - _app->forge().make(min)); - - if (!std::isnan(max)) - _app->interface()->set_property(_object->uri(), - uris.lv2_maximum, - _app->forge().make(max)); + const URIs& uris = _app->uris(); + SPtr model = dynamic_ptr_cast(_object); + + // Remove lv2:minimum and lv2:maximum properties + Resource::Properties remove; + remove.insert({uris.lv2_minimum, Resource::Property(uris.patch_wildcard)}); + remove.insert({uris.lv2_maximum, Resource::Property(uris.patch_wildcard)}); + _app->interface()->delta(_object->uri(), remove, Resource::Properties()); } void -- cgit v1.2.1