[goffice] GocPolygon: fix sam FMW as for GocPolyline.



commit 8942d2e0240ad617920614a750e0753a398bb075
Author: Morten Welinder <terra gnome org>
Date:   Sun Mar 16 20:24:49 2014 -0400

    GocPolygon: fix sam FMW as for GocPolyline.

 ChangeLog                    |    2 ++
 NEWS                         |    2 +-
 goffice/canvas/goc-polygon.c |    6 ------
 3 files changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 0a0fb5a..2aa0946 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,8 @@
        save and restore style->width.  Code was changed four years ago to
        copy the style.  And restoring after the _unref is bad.
 
+       * goffice/canvas/goc-polygon.c (goc_polygon_distance): Ditto.
+
        * goffice/math/go-math.c (_go_math_init): Add test for buggy math
        library (probably caused by compiler bug).
 
diff --git a/NEWS b/NEWS
index cd66b33..241f98b 100644
--- a/NEWS
+++ b/NEWS
@@ -15,7 +15,7 @@ Julian Sikorski:
 Morten:
        * Fix problem saving print settings.  [#698630]
        * Plug leak.
-       * Fix FMW problem with GocPolyline.
+       * Fix FMW problem with GocPolyline/GocPolygon.
 
 --------------------------------------------------------------------------
 goffice 0.10.12:
diff --git a/goffice/canvas/goc-polygon.c b/goffice/canvas/goc-polygon.c
index 69637bb..5a1201b 100644
--- a/goffice/canvas/goc-polygon.c
+++ b/goffice/canvas/goc-polygon.c
@@ -247,8 +247,6 @@ goc_polygon_distance (GocItem *item, double x, double y, GocItem **near_item)
        GOStyle *style = go_style_dup (go_styled_object_get_style (GO_STYLED_OBJECT (item)));
        double res = G_MAXDOUBLE;
        double ppu = goc_canvas_get_pixels_per_unit (item->canvas);
-       double tmp_width = 0;
-       gboolean tmp_auto_dash = style->line.auto_dash;
        GOLineDashType tmp_dash_type = style->line.dash_type;
        cairo_surface_t *surface;
        cairo_t *cr;
@@ -257,7 +255,6 @@ goc_polygon_distance (GocItem *item, double x, double y, GocItem **near_item)
                return res;
 
        *near_item = item;
-       tmp_width = style->line.width;
        if (style->line.width * ppu < 5)
                style->line.width = 5. / (ppu * ppu);
        else
@@ -284,9 +281,6 @@ goc_polygon_distance (GocItem *item, double x, double y, GocItem **near_item)
        g_object_unref (style);
        cairo_destroy (cr);
        cairo_surface_destroy (surface);
-       style->line.width = tmp_width;
-       style->line.auto_dash = tmp_auto_dash;
-       style->line.dash_type = tmp_dash_type;
        return res;
 }
 


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