Send bridge method injects the first selected element into the sent data for testing

Mesh vertices, faces and colours are all single arrays
This commit is contained in:
Ralph Wessel
2024-10-03 17:05:02 +01:00
parent 8dd00005b1
commit f066b0ee02
2 changed files with 5 additions and 5 deletions
@@ -89,6 +89,6 @@ void Send::run(const String& modelCardID) const {
//Send the collected information
auto result = std::make_unique<SendViaBrowserArgs>(*modelCard, *account, std::make_unique<Record>()); //NB: Using a placeholder object for now
getBridge()->sendEvent("sendByBrowser", std::move(result));
auto result = std::make_unique<SendViaBrowserArgs>(*modelCard, *account, SendObject{std::move(element)}); //NB: Using a placeholder object for now
getBridge()->sendEvent("sendByBrowser", std::move(result));
} //Send::run
+3 -3
View File
@@ -39,9 +39,9 @@ bool Mesh::fillInventory(Inventory& inventory) const {
using enum Entry::Type;
inventory.merge(Inventory{
{
{ fieldID[vertexID], vertexID, vertices.size(), std::nullopt, !vertices.empty() },
{ fieldID[faceID], faceID, faces.size(), std::nullopt, !faces.empty() },
{ fieldID[colorID], colorID, colors.size(), std::nullopt, !colors.empty() },
{ fieldID[vertexID], vertexID, element },
{ fieldID[faceID], faceID, element },
{ fieldID[colorID], colorID, element },
},
}.withType(&typeid(Mesh)));
return true;