From f4b87e340cedb6159bc77b7b7be7d25361dbc8b8 Mon Sep 17 00:00:00 2001 From: Herbert Poul Date: Wed, 4 Sep 2019 10:11:28 +0200 Subject: [PATCH] mark as non-dirty when converted toXml --- lib/src/kdbx_object.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/src/kdbx_object.dart b/lib/src/kdbx_object.dart index 7bed415..bd6a3ab 100644 --- a/lib/src/kdbx_object.dart +++ b/lib/src/kdbx_object.dart @@ -44,8 +44,11 @@ abstract class KdbxNode with Changeable { // @protected // String text(String nodeName) => _opt(nodeName)?.text; + /// must only be called to save this object. + /// will mark this object as not dirty. @mustCallSuper XmlElement toXml() { + _isDirty = false; final el = node.copy() as XmlElement; return el; }