diff options
| author | John Smith <john.smith7545@yahoo.com> | 2012-08-20 12:53:17 +0000 |
|---|---|---|
| committer | John Smith <john.smith7545@yahoo.com> | 2012-08-20 12:53:17 +0000 |
| commit | e92962ddc609aaba91d1b9781ea044e84bafeb1b (patch) | |
| tree | dc25d7d48782832e2c8073f63a2dec4a26081cf8 /src/helper/stock-items.cpp | |
| parent | round-off incoming png resolution to 0.1 dpi (Bug 165952 comment 20) (diff) | |
| download | inkscape-e92962ddc609aaba91d1b9781ea044e84bafeb1b.tar.gz inkscape-e92962ddc609aaba91d1b9781ea044e84bafeb1b.zip | |
Fix for 165865 : markers must take object's stroke color
(bzr r11614)
Diffstat (limited to 'src/helper/stock-items.cpp')
| -rw-r--r-- | src/helper/stock-items.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/helper/stock-items.cpp b/src/helper/stock-items.cpp index e18d56199..902aebdeb 100644 --- a/src/helper/stock-items.cpp +++ b/src/helper/stock-items.cpp @@ -173,7 +173,7 @@ sp_gradient_load_from_svg(gchar const *name, SPDocument *current_doc) // if necessary it will import the object. Copes with name clashes through use of the inkscape:stockid property // This should be set to be the same as the id in the libary file. -SPObject *get_stock_item(gchar const *urn) +SPObject *get_stock_item(gchar const *urn, gboolean stock) { g_assert(urn != NULL); @@ -202,7 +202,7 @@ SPObject *get_stock_item(gchar const *urn) return NULL; } SPObject *object = NULL; - if (!strcmp(base, "marker")) { + if (!strcmp(base, "marker") && !stock) { for ( SPObject *child = defs->firstChild(); child; child = child->getNext() ) { if (child->getRepr()->attribute("inkscape:stockid") && @@ -214,7 +214,7 @@ SPObject *get_stock_item(gchar const *urn) } } - else if (!strcmp(base,"pattern")) { + else if (!strcmp(base,"pattern") && !stock) { for ( SPObject *child = defs->firstChild() ; child; child = child->getNext() ) { if (child->getRepr()->attribute("inkscape:stockid") && @@ -226,7 +226,7 @@ SPObject *get_stock_item(gchar const *urn) } } - else if (!strcmp(base,"gradient")) { + else if (!strcmp(base,"gradient") && !stock) { for ( SPObject *child = defs->firstChild(); child; child = child->getNext() ) { if (child->getRepr()->attribute("inkscape:stockid") && @@ -255,6 +255,10 @@ SPObject *get_stock_item(gchar const *urn) g_free(base); g_free(name); + if (object) { + object->getRepr()->setAttribute("inkscape:isstock", "true"); + } + return object; } |
