New method name in Property class for string value

This commit is contained in:
VLLindqvist
2023-06-12 00:27:02 +02:00
parent f032e9423c
commit 08f3a0790c
3 changed files with 7 additions and 10 deletions

View File

@@ -418,7 +418,7 @@ bool handleDateValue(
global::scriptEngine->queueScript(
fmt::format(
"openspace.setPropertyValueSingle('Scene.{}.Renderable.{}', {});",
identifier, propertyName, newDate
identifier, propertyName, ghoul::to_string(newDate)
),
scripting::ScriptEngine::RemoteScripting::Yes
);
@@ -547,7 +547,7 @@ bool handleStringValue(
if (!property) return;
// Update string property of renderable
auto currentStringValue = property->getStringValue();
auto currentStringValue = property->stringValue();
if (newStringValue != currentStringValue) {
global::scriptEngine->queueScript(
fmt::format(
@@ -574,10 +574,7 @@ bool handleStringValue(
return true;
}
void handleDataMessage(const std::vector<std::byte>& message, std::shared_ptr<SoftwareConnection> connection) {
// LDEBUG(fmt::format("Message recieved on connection {}... New Data", connectionPtr->id()));
// will_send_message = false
void handleDataMessage(const std::vector<std::byte>& message, std::shared_ptr<SoftwareConnection> connection) {
size_t offset = 0;
std::string identifier;
@@ -884,7 +881,7 @@ void handleMessage(IncomingMessage& incomingMessage) {
break;
}
std::string sendBack = fmt::format("{}{}", software, simp::DELIM);
std::string sendBack = software + simp::DELIM;
// Send back message to software to complete handshake
std::vector<std::byte> subject;

View File

@@ -429,7 +429,7 @@ void SoftwareConnection::handleOutgoingMessages() {
size_t subjectBufferOffset = 0;
subjectBuffer.clear();
std::string subjectPrefixString = fmt::format(
"{}{}{}{}", identifier, simp::DELIM, guiNameProp->getStringValue(), simp::DELIM
"{}{}{}{}", identifier, simp::DELIM, guiNameProp->stringValue(), simp::DELIM
);
simp::toByteBuffer(subjectBuffer, subjectBufferOffset, subjectPrefixString);

View File

@@ -212,7 +212,7 @@ bool softwareintegration::Session::saveSession(const std::string& wantedFileName
assetFile << INDENT << "{\n"
<< INDENT << INDENT << "GUI = {\n"
<< INDENT << INDENT << INDENT << "Name = " << r->property("Name")->getStringValue() << ",\n"
<< INDENT << INDENT << INDENT << "Name = " << r->property("Name")->stringValue() << ",\n"
<< INDENT << INDENT << INDENT << "Path = \"/Software Integration\"" << "\n"
<< INDENT << INDENT << "},\n"
<< INDENT << INDENT << "Identifier = \"" << identifier << "\",\n"
@@ -237,7 +237,7 @@ bool softwareintegration::Session::saveSession(const std::string& wantedFileName
assetFile << INDENT << INDENT << INDENT
<< p->identifier() << " = ";
std::string valueAsString = p->getStringValue();
std::string valueAsString = p->stringValue();
if (std::string{ p->type().name() }.find("string") == std::string::npos) {
for(