[gxml] Element.vala: fix bug where stringifyings Elements would show unsynced versions without updated attr



commit 12a6cf25a453d00a175123e92cc587c252c13b85
Author: Richard Schwarting <aquarichy gmail com>
Date:   Tue Sep 24 06:31:29 2013 -0400

    Element.vala: fix bug where stringifyings Elements would show unsynced versions without updated attributes

 gxml/Element.vala |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/gxml/Element.vala b/gxml/Element.vala
index b475783..e7db39d 100644
--- a/gxml/Element.vala
+++ b/gxml/Element.vala
@@ -561,5 +561,16 @@ namespace GXml {
                                base.node->set_content (value);
                        }
                }
+
+               /**
+                * { inheritDoc}
+                */
+               public override string to_string (bool format = false, int level = 0) {
+                       /* TODO: may want to determine a way to only sync when
+                          attributes have been modified */
+
+                       this.owner_document.dirty_elements.append (this);
+                       return base.to_string (format, level);
+               }
        }
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]