fix: Loading data processor nodes from project thowing errors (#1065)

This will correct the errors `cannot use operator[] with a string
argument with string[..]` when loading a project
This commit is contained in:
iTrooz
2023-05-11 09:57:29 +02:00
committed by GitHub
parent ab41899cc2
commit b0ab8698ec

View File

@@ -322,9 +322,9 @@ namespace hex::plugin::builtin {
.basePath = "data_processor.json",
.required = false,
.load = [this](prv::Provider *provider, const std::fs::path &basePath, Tar &tar) {
auto save = tar.readString(basePath);
std::string save = tar.readString(basePath);
ViewDataProcessor::loadNodes(this->m_mainWorkspace.get(provider), save);
ViewDataProcessor::loadNodes(this->m_mainWorkspace.get(provider), nlohmann::json::parse(save));
this->m_updateNodePositions = true;
return true;