Skip to content
Snippets Groups Projects
Commit 6dbabf5e authored by David Sehnal's avatar David Sehnal
Browse files

mol-plugin: fix selection caching

parent bb12275b
Branches
Tags
No related merge requests found
......@@ -278,7 +278,7 @@ const StructureSelection = PluginStateTransform.BuiltIn({
if ((cache as { source: Structure }).source === a.data) {
return StateTransformer.UpdateResult.Unchanged;
}
(cache as { source: Structure }).source === a.data;
(cache as { source: Structure }).source = a.data;
if (updateStructureFromQuery((cache as { compiled: QueryFn<Sel> }).compiled, a.data, b, newParams.label)) {
return StateTransformer.UpdateResult.Updated;
......@@ -318,7 +318,7 @@ const UserStructureSelection = PluginStateTransform.BuiltIn({
if ((cache as { source: Structure }).source === a.data) {
return StateTransformer.UpdateResult.Unchanged;
}
(cache as { source: Structure }).source === a.data;
(cache as { source: Structure }).source = a.data;
updateStructureFromQuery((cache as { compiled: QueryFn<Sel> }).compiled, a.data, b, newParams.label);
return StateTransformer.UpdateResult.Updated;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment