From: miklosh Date: Mon, 30 Jul 2007 12:02:57 +0000 (+0000) Subject: Do not set inkscape:groupmode for sub-page objects (eg. patterns) X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=1cda9431ef400135f5e1bd899a94b921bdad0eaf;p=inkscape.git Do not set inkscape:groupmode for sub-page objects (eg. patterns) --- diff --git a/src/extension/internal/pdfinput/svg-builder.cpp b/src/extension/internal/pdfinput/svg-builder.cpp index 0aa2067d4..e52be554c 100644 --- a/src/extension/internal/pdfinput/svg-builder.cpp +++ b/src/extension/internal/pdfinput/svg-builder.cpp @@ -70,6 +70,7 @@ SvgBuilder::SvgBuilder() { } SvgBuilder::SvgBuilder(SPDocument *document, gchar *docname, XRef *xref) { + _is_top_level = true; _doc = document; _docname = docname; _xref = xref; @@ -80,6 +81,7 @@ SvgBuilder::SvgBuilder(SPDocument *document, gchar *docname, XRef *xref) { } SvgBuilder::SvgBuilder(SvgBuilder *parent, Inkscape::XML::Node *root) { + _is_top_level = false; _doc = parent->_doc; _docname = parent->_docname; _xref = parent->_xref; @@ -127,7 +129,7 @@ Inkscape::XML::Node *SvgBuilder::pushGroup() { Inkscape::GC::release(node); _group_depth.back()++; // Set as a layer if this is a top-level group - if ( _container->parent() == _root ) { + if ( _container->parent() == _root && _is_top_level ) { static int layer_count = 1; if ( layer_count > 1 ) { gchar *layer_name = g_strdup_printf("%s%d", _docname, layer_count); diff --git a/src/extension/internal/pdfinput/svg-builder.h b/src/extension/internal/pdfinput/svg-builder.h index a329e3020..08035e214 100644 --- a/src/extension/internal/pdfinput/svg-builder.h +++ b/src/extension/internal/pdfinput/svg-builder.h @@ -166,6 +166,7 @@ private: bool _invalidated_style; GfxState *_current_state; + bool _is_top_level; // Whether this SvgBuilder is the top-level one SPDocument *_doc; gchar *_docname; // Basename of the URI from which this document is created XRef *_xref; // Cross-reference table from the PDF doc we're converting from