[dia] svg: fix text getting visible background during import



commit 8c97fba6ecddcb27ea5a72e04da4c3f141d7bd82
Author: Hans Breuer <hans breuer org>
Date:   Thu Oct 9 19:31:22 2014 +0200

    svg: fix text getting visible background during import
    
    Could be seen with transform-variations.svg and default black/white
    foreground/background settings.

 plug-ins/svg/svg-import.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/plug-ins/svg/svg-import.c b/plug-ins/svg/svg-import.c
index eb6e7a7..dd1a771 100644
--- a/plug-ins/svg/svg-import.c
+++ b/plug-ins/svg/svg-import.c
@@ -492,7 +492,10 @@ apply_style(DiaObject *obj, xmlNodePtr node, DiaSvgStyle *parent_style,
       if(gs->fill == DIA_SVG_COLOUR_NONE || gs->fill_opacity == 0) {
        bprop->bool_data = FALSE;
       } else {
-       bprop->bool_data = TRUE;
+       if (init)
+         bprop->bool_data = TRUE;
+       else
+         bprop->common.experience |= PXP_NOTSET; /* no overwrite */
       }
       /* apply pattern, gradient if any */
       str = xmlGetProp(node, (const xmlChar *)"fill");
@@ -738,7 +741,7 @@ read_text_svg(xmlNodePtr node, DiaSvgStyle *parent_style,
     point.x = _node_get_real (node, "x", 0.0);
     point.y = _node_get_real (node, "y", 0.0);
 
-    /* text propety handling is special, don't use apply_style() */
+    /* text property handling is special, don't use apply_style() */
     _node_css_parse_style (node, gs, user_scale, style_ht);
 
     /* font-size can be given in the style (with absolute unit) or


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]