From 317627ef40f7654c298aa1ac707851c852259e3a Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 18 Aug 2012 23:05:06 +0000 Subject: Node => Block git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4720 a436a847-0d15-0410-975c-d299462d15a1 --- src/gui/PortMenu.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src/gui/PortMenu.cpp') diff --git a/src/gui/PortMenu.cpp b/src/gui/PortMenu.cpp index a5b907c3..a23e3b84 100644 --- a/src/gui/PortMenu.cpp +++ b/src/gui/PortMenu.cpp @@ -121,9 +121,9 @@ PortMenu::on_menu_set_max() void PortMenu::on_menu_reset_range() { - const URIs& uris = _app->uris(); - SharedPtr model = PtrCast(_object); - SharedPtr parent = PtrCast(_object->parent()); + const URIs& uris = _app->uris(); + SharedPtr model = PtrCast(_object); + SharedPtr parent = PtrCast(_object->parent()); float min, max; parent->default_port_value_range(model, min, max); @@ -142,12 +142,12 @@ PortMenu::on_menu_reset_range() void PortMenu::on_menu_expose() { - const URIs& uris = _app->uris(); - SharedPtr port = PtrCast(_object); - SharedPtr node = PtrCast(port->parent()); + const URIs& uris = _app->uris(); + SharedPtr port = PtrCast(_object); + SharedPtr block = PtrCast(port->parent()); - const std::string label = node->label() + " " + node->port_label(port); - const Raul::Path path = Raul::Path(node->path() + Raul::Symbol("_" + port->symbol())); + const std::string label = block->label() + " " + block->port_label(port); + const Raul::Path path = Raul::Path(block->path() + Raul::Symbol("_" + port->symbol())); Ingen::Resource r(*_object.get()); r.remove_property(uris.lv2_index, uris.wildcard); @@ -155,12 +155,12 @@ PortMenu::on_menu_expose() r.set_property(uris.lv2_name, _app->forge().alloc(label.c_str())); // TODO: Pretty kludgey coordinates - const float node_x = node->get_property(uris.ingen_canvasX).get_float(); - const float node_y = node->get_property(uris.ingen_canvasY).get_float(); - const float x_off = (label.length() * 16.0f) * (port->is_input() ? -1 : 1); - const float y_off = port->index() * 32.0f; - r.set_property(uris.ingen_canvasX, _app->forge().make(node_x + x_off)); - r.set_property(uris.ingen_canvasY, _app->forge().make(node_y + y_off)); + const float block_x = block->get_property(uris.ingen_canvasX).get_float(); + const float block_y = block->get_property(uris.ingen_canvasY).get_float(); + const float x_off = (label.length() * 16.0f) * (port->is_input() ? -1 : 1); + const float y_off = port->index() * 32.0f; + r.set_property(uris.ingen_canvasX, _app->forge().make(block_x + x_off)); + r.set_property(uris.ingen_canvasY, _app->forge().make(block_y + y_off)); _app->interface()->put(GraphObject::path_to_uri(path), r.properties()); -- cgit v1.2.1