From 6cd82e8e8aab2db26e82bdeafa97d362ff04f4b5 Mon Sep 17 00:00:00 2001 From: aniisaaden Date: Tue, 22 Sep 2020 14:51:27 +0200 Subject: [PATCH] Opacity & Size message types added --- .../softwareintegrationmodule.cpp | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/modules/softwareintegration/softwareintegrationmodule.cpp b/modules/softwareintegration/softwareintegrationmodule.cpp index 357574ca6e..84752701d8 100644 --- a/modules/softwareintegration/softwareintegrationmodule.cpp +++ b/modules/softwareintegration/softwareintegrationmodule.cpp @@ -172,17 +172,12 @@ namespace openspace { std::string lengthOfSubject = os.str(); std::string message = messageType + lengthOfSubject + subject; - peer->connection.sendMessage(message); - - LERROR(fmt::format("Meddelandet som skickas {}", message)); }; colorProperty->onChange(updateColor); - /* - // Update opacity of renderable - auto updateOpacity = [opacityProperty, identifier]() { + auto updateOpacity = [opacityProperty, identifier, peer]() { std::string lengthOfIdentifier = std::to_string(identifier.length()); std::string propertyValue = opacityProperty->getStringValue(); std::string lengthOfValue = std::to_string(propertyValue.length()); @@ -195,14 +190,12 @@ namespace openspace { std::string lengthOfSubject = os.str(); std::string message = messageType + lengthOfSubject + subject; - SoftwareConnection send; - send.sendMessage(message); - LERROR(fmt::format("Meddelandet som skickas {}", message)); + peer->connection.sendMessage(message); }; opacityProperty->onChange(updateOpacity); // Update size of renderable - auto updateSize = [sizeProperty, identifier]() { + auto updateSize = [sizeProperty, identifier, peer]() { std::string lengthOfIdentifier = std::to_string(identifier.length()); std::string propertyValue = sizeProperty->getStringValue(); std::string lengthOfValue = std::to_string(propertyValue.length()); @@ -215,13 +208,9 @@ namespace openspace { std::string lengthOfSubject = os.str(); std::string message = messageType + lengthOfSubject + subject; - SoftwareConnection send; - send.sendMessage(message); - LERROR(fmt::format("Meddelandet som skickas {}", message)); + peer->connection.sendMessage(message); }; sizeProperty->onChange(updateSize); - - */ } void SoftwareIntegrationModule::handlePeerMessage(PeerMessage peerMessage) {