mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-05 19:09:23 -05:00
Issue/2000 automatically update gui (#3289)
* Make it possible to query a propertyowner by uri with the getpropertytopic * Remove automatic reloading of ui from drag and drop script * Add function for uri for propertyowners * Add uri to the to_json for the propertyowner * Add comment for the propertyOwner function and update the comment for the property function to clearer distinguish between uris and identifiers * Go back to the old events but with uris instead as their member * Apply feedback from PR * Address PR comments --------- Co-authored-by: Ylva Selling <ylva.selling@liu.se>
This commit is contained in:
@@ -168,20 +168,11 @@ Layer* LayerGroup::addLayer(const ghoul::Dictionary& layerDict) {
|
||||
// initialize function. This means that the layerManager does not exists yet, and
|
||||
// we cannot find which SGN it belongs to... Want to avoid doing this check, so
|
||||
// this should be fixed (probably as part of a cleanup/rewite of the LayerManager)
|
||||
if (!layerManager) {
|
||||
global::eventEngine->publishEvent<events::EventLayerAdded>(
|
||||
"", // we don't know this yet
|
||||
layerGroup->identifier(),
|
||||
ptr->identifier()
|
||||
);
|
||||
}
|
||||
else {
|
||||
if (layerManager) {
|
||||
properties::PropertyOwner* globe = layerManager->owner();
|
||||
properties::PropertyOwner* sceneGraphNode = globe->owner();
|
||||
global::eventEngine->publishEvent<events::EventLayerAdded>(
|
||||
sceneGraphNode->identifier(),
|
||||
layerGroup->identifier(),
|
||||
ptr->identifier()
|
||||
ptr->uri()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -203,9 +194,7 @@ void LayerGroup::deleteLayer(const std::string& layerName) {
|
||||
properties::PropertyOwner* globe = layerManager->owner();
|
||||
properties::PropertyOwner* sceneGraphNode = globe->owner();
|
||||
global::eventEngine->publishEvent<events::EventLayerRemoved>(
|
||||
sceneGraphNode->identifier(),
|
||||
layerGroup->identifier(),
|
||||
it->get()->identifier()
|
||||
it->get()->uri()
|
||||
);
|
||||
// We need to keep the name of the layer since we only get it as a reference
|
||||
// and the name needs to survive the deletion
|
||||
|
||||
Reference in New Issue
Block a user