From 6ba189fa3473ed06c3d35b7015e4009b1c9f0f92 Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Sun, 31 Dec 2023 19:57:57 +0300 Subject: [PATCH] Remove second invalidate on meta node remove --- .../kotlin/space/kscience/dataforge/meta/MutableMeta.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dataforge-meta/src/commonMain/kotlin/space/kscience/dataforge/meta/MutableMeta.kt b/dataforge-meta/src/commonMain/kotlin/space/kscience/dataforge/meta/MutableMeta.kt index 24a09240..f1e66060 100644 --- a/dataforge-meta/src/commonMain/kotlin/space/kscience/dataforge/meta/MutableMeta.kt +++ b/dataforge-meta/src/commonMain/kotlin/space/kscience/dataforge/meta/MutableMeta.kt @@ -324,8 +324,6 @@ private class MutableMetaImpl( //remove child and invalidate if argument is null if (node == null) { children.remove(token)?.removeListener(this) - // old item is not null otherwise we can't be here - invalidate(name) } else { val newNode = wrapItem(node) newNode.adoptBy(this, token) @@ -335,7 +333,7 @@ private class MutableMetaImpl( else -> { val token = name.firstOrNull()!! - //get existing or create new node. + //get an existing node or create a new node. if (items[token] == null) { val newNode = MutableMetaImpl(null) newNode.adoptBy(this, token)