From 9e210a6d1333c3366681547e3e81593ef69ff73e Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Thu, 14 Jul 2016 12:56:49 +0200 Subject: Last part of new SPObject children list (bzr r14954.1.20) --- src/text-editing.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/text-editing.cpp') diff --git a/src/text-editing.cpp b/src/text-editing.cpp index b03be792b..6ca2fe948 100644 --- a/src/text-editing.cpp +++ b/src/text-editing.cpp @@ -944,13 +944,10 @@ sp_te_set_repr_text_multiline(SPItem *text, gchar const *str) gchar *content = g_strdup (str); repr->setContent(""); - SPObject *child = object->firstChild(); - while (child) { - SPObject *next = child->getNext(); - if (!SP_IS_FLOWREGION(child) && !SP_IS_FLOWREGIONEXCLUDE(child)) { - repr->removeChild(child->getRepr()); + for (auto& child: object->_children) { + if (!SP_IS_FLOWREGION(&child) && !SP_IS_FLOWREGIONEXCLUDE(&child)) { + repr->removeChild(child.getRepr()); } - child = next; } gchar *p = content; -- cgit v1.2.3