summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/document-properties.cpp
diff options
context:
space:
mode:
authorFelipe Corr??a da Silva Sanches <juca@members.fsf.org>2011-06-19 01:47:52 +0000
committerFelipe C. da S. Sanches <juca@members.fsf.org>2011-06-19 01:47:52 +0000
commitac1f4a1f7b4c9263d2ab490b8f346c5ef0a4b716 (patch)
treebc54775c85bb0ec10e7337d2cea881a875a8912d /src/ui/dialog/document-properties.cpp
parentPatch sent by Fernando Lucchesi (GSoC student) and modified by me. (diff)
downloadinkscape-ac1f4a1f7b4c9263d2ab490b8f346c5ef0a4b716.tar.gz
inkscape-ac1f4a1f7b4c9263d2ab490b8f346c5ef0a4b716.zip
I am not sure if it is possible to have a script element with more than a single childnode. Since we are not handling that, this is a warning to be displayed if we even encounter a file with more than one child for one of its script element nodes
(bzr r10319)
Diffstat (limited to 'src/ui/dialog/document-properties.cpp')
-rw-r--r--src/ui/dialog/document-properties.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp
index 4434e3bd6..569dd2311 100644
--- a/src/ui/dialog/document-properties.cpp
+++ b/src/ui/dialog/document-properties.cpp
@@ -844,6 +844,15 @@ void DocumentProperties::changeEmbeddedScript(){
SPObject* obj = SP_OBJECT(current->data);
if (id == obj->getId()){
+ int count=0;
+ for ( SPObject *child = obj->children ; child; child = child->next )
+ {
+ count++;
+ }
+
+ if (count>1)
+ g_warning("TODO: Found a script element with multiple (%d) child nodes! We must implement support for that!", count);
+
//XML Tree being used directly here while it shouldn't be.
SPObject* child = obj->firstChild();
//TODO: shouldnt we get all children instead of simply the first child?