From 24b575cf28f9b007939b9fa14c991c51326c8348 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 18 Feb 2017 18:40:10 +0100 Subject: Fix loading UIs with separate data files --- src/client/PluginUI.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/client/PluginUI.cpp b/src/client/PluginUI.cpp index 0150cd0d..b4631f0d 100644 --- a/src/client/PluginUI.cpp +++ b/src/client/PluginUI.cpp @@ -168,6 +168,7 @@ PluginUI::~PluginUI() lilv_node_free(_ui_node); lilv_node_free(_ui_type); lilv_uis_free(_uis); + lilv_world_unload_resource(_world->lilv_world(), lilv_ui_get_uri(_ui)); } SPtr @@ -219,11 +220,14 @@ PluginUI::instantiate() { const URIs& uris = _world->uris(); const std::string plugin_uri = _block->plugin()->uri(); + LilvWorld* lworld = _world->lilv_world(); + + // Load seeAlso files to access data like portNotification descriptions + lilv_world_load_resource(lworld, lilv_ui_get_uri(_ui)); /* Subscribe (enable broadcast) for any requested port notifications. This must be done before instantiation so responses to any events sent by the UI's init() will be sent back to this client. */ - LilvWorld* lworld = _world->lilv_world(); LilvNode* ui_portNotification = lilv_new_uri(lworld, LV2_UI__portNotification); LilvNode* ui_plugin = lilv_new_uri(lworld, LV2_UI__plugin); LilvNodes* notes = lilv_world_find_nodes( -- cgit v1.2.1