nodes: Fixed loading saved nodes multiple times

This commit is contained in:
WerWolv
2023-02-10 11:22:11 +01:00
parent 6281adc7c3
commit a59c17aa83
5 changed files with 30 additions and 8 deletions

View File

@@ -1372,6 +1372,10 @@ namespace hex::plugin::builtin {
return std::nullopt;
};
auto prevContext = ImNodes::GetCurrentContext();
ImNodes::SetCurrentContext(this->m_workspace.context.get());
ON_SCOPE_EXIT { ImNodes::SetCurrentContext(prevContext); };
// Forward inputs to input nodes values
for (auto &attribute : this->getAttributes()) {
auto index = indexFromId(attribute.getId());