summaryrefslogtreecommitdiffstats
path: root/src/sp-mesh-row.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sp-mesh-row.cpp')
-rw-r--r--src/sp-mesh-row.cpp33
1 files changed, 29 insertions, 4 deletions
diff --git a/src/sp-mesh-row.cpp b/src/sp-mesh-row.cpp
index dd7948bdf..5ac349c27 100644
--- a/src/sp-mesh-row.cpp
+++ b/src/sp-mesh-row.cpp
@@ -17,8 +17,6 @@
#include "sp-mesh-row.h"
#include "style.h"
-#include "xml/repr.h"
-
SPMeshrow* SPMeshrow::getNextMeshrow()
{
SPMeshrow *result = 0;
@@ -67,17 +65,44 @@ void SPMeshrow::build(SPDocument* doc, Inkscape::XML::Node* repr) {
SPObject::build(doc, repr);
}
+
/**
* Virtual build: set meshrow attributes from its associated XML node.
*/
-
void SPMeshrow::set(unsigned int /*key*/, const gchar* /*value*/) {
}
/**
- * Virtual set: set attribute to value.
+ * modified
*/
+void SPMeshrow::modified(unsigned int flags) {
+
+ flags &= SP_OBJECT_MODIFIED_CASCADE;
+ GSList *l = NULL;
+
+ for (auto& child: children) {
+ sp_object_ref(&child);
+ l = g_slist_prepend(l, &child);
+ }
+
+ l = g_slist_reverse(l);
+
+ while (l) {
+ SPObject *child = SP_OBJECT(l->data);
+ l = g_slist_remove(l, child);
+ if (flags || (child->mflags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_CHILD_MODIFIED_FLAG))) {
+ child->emitModified(flags);
+ }
+
+ sp_object_unref(child);
+ }
+}
+
+
+/**
+ * Virtual set: set attribute to value.
+ */
Inkscape::XML::Node* SPMeshrow::write(Inkscape::XML::Document* xml_doc, Inkscape::XML::Node* repr, guint flags) {
if ((flags & SP_OBJECT_WRITE_BUILD) && !repr) {
repr = xml_doc->createElement("svg:meshrow");