[dia] svg: style="stroke-dasharray:none;" gives a solid line now



commit 85899d7bbcebbf61f72a801a7a95bab276354d0c
Author: Hans Breuer <hans breuer org>
Date:   Sun Sep 4 20:59:27 2011 +0200

    svg: style="stroke-dasharray:none;" gives a solid line now
    
    previously it gave LINESTYLE_DASHED with dashlength=0

 lib/dia_svg.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/lib/dia_svg.c b/lib/dia_svg.c
index 54f3a26..8cb6365 100644
--- a/lib/dia_svg.c
+++ b/lib/dia_svg.c
@@ -337,7 +337,9 @@ dia_svg_parse_style(xmlNodePtr node, DiaSvgStyle *s, real user_scale)
 	  s->dashlength = 1.0;
 	else {
 	  s->dashlength = g_ascii_strtod(ptr, &ptr);
-	  if (user_scale > 0)
+	  if (s->dashlength <= 0.0) /* e.g. "none" */
+	    s->linestyle = LINESTYLE_SOLID;
+	  else if (user_scale > 0)
 	    s->dashlength /= user_scale;
 	}
       }



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