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

gEDA-cvs: gaf.git: branch: master updated (1.5.0-20080706-386-g645ddeb)



The branch, master has been updated
       via  645ddeba66b2bb589e6d5097dc8ead13529fd26f (commit)
      from  1a38d368b89110372d311ddcd22a515b88d87ca0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


=========
 Summary
=========

 libgeda/src/m_polygon.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)


=================
 Commit Messages
=================

commit 645ddeba66b2bb589e6d5097dc8ead13529fd26f
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Wed Dec 17 01:34:14 2008 +0000

    libgeda: Fix mistake leftover from cleaning up o_*_shortest_distance()
    
    m_polygon_shortest_distance() calls o_line_shortest_distance() (which I
    missed). It fills in geometry to a LINE structure, then calls the above
    function. Make up a fake OBJECT structure as well, since we changed it
    to take an OBEJCT * instead of a LINE *.

:100644 100644 8ee6145... 175e6fc... M	libgeda/src/m_polygon.c

=========
 Changes
=========

commit 645ddeba66b2bb589e6d5097dc8ead13529fd26f
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Wed Dec 17 01:34:14 2008 +0000

    libgeda: Fix mistake leftover from cleaning up o_*_shortest_distance()
    
    m_polygon_shortest_distance() calls o_line_shortest_distance() (which I
    missed). It fills in geometry to a LINE structure, then calls the above
    function. Make up a fake OBJECT structure as well, since we changed it
    to take an OBEJCT * instead of a LINE *.

diff --git a/libgeda/src/m_polygon.c b/libgeda/src/m_polygon.c
index 8ee6145..175e6fc 100644
--- a/libgeda/src/m_polygon.c
+++ b/libgeda/src/m_polygon.c
@@ -168,8 +168,11 @@ double m_polygon_shortest_distance (GArray *points, int x, int y, gboolean close
 
     while (i < points->len) {
       double distance;
+      OBJECT object;
       LINE line;
 
+      object.line = &line;
+
       line.x[0] = point.x;
       line.y[0] = point.y;
 
@@ -178,7 +181,7 @@ double m_polygon_shortest_distance (GArray *points, int x, int y, gboolean close
       line.x[1] = point.x;
       line.y[1] = point.y;
 
-      distance = o_line_shortest_distance (&line, x, y);
+      distance = o_line_shortest_distance (&object, x, y);
 
       shortest = min (shortest, distance);
     }




_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs