Skip to content

Commit

Permalink
Merge branch 'dev' into release/3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanRynne committed Dec 12, 2024
2 parents 49f761f + 36fc9cf commit 4f342ee
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ void SendBridge::GetSendFilters(const RunMethodEventArgs& args)
filter.name = "Selection";
filter.selectedObjectIds = CONNECTOR.GetHostToSpeckleConverter().GetSelection();
filter.summary = std::to_string(filter.selectedObjectIds.size()) + " objects selected";
filter.isDefault = true;

nlohmann::json sendFilters;
sendFilters.push_back(filter);
Expand Down
2 changes: 2 additions & 0 deletions AddOns/Speckle/Sources/AddOn/DataTypes/SendFilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ void to_json(nlohmann::json& j, const SendFilter& filter)
j["selectedObjectIds"] = filter.selectedObjectIds;
j["name"] = filter.name;
j["summary"] = filter.summary;
j["isDefault"] = filter.isDefault;
}

void from_json(const nlohmann::json& j, SendFilter& filter)
Expand All @@ -14,4 +15,5 @@ void from_json(const nlohmann::json& j, SendFilter& filter)
filter.selectedObjectIds = j.at("selectedObjectIds").get<std::vector<std::string>>();
filter.name = j.at("name").get<std::string>();
filter.summary = j.at("summary").get<std::string>();
filter.isDefault = j.at("isDefault").get<bool>();
}
1 change: 1 addition & 0 deletions AddOns/Speckle/Sources/AddOn/DataTypes/SendFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ struct SendFilter
std::vector<std::string> selectedObjectIds;
std::string name;
std::string summary;
bool isDefault = false;
};

void to_json(nlohmann::json& j, const SendFilter& filter);
Expand Down

0 comments on commit 4f342ee

Please sign in to comment.