gui/broken_edge.cc
changeset 1501 39d59aee2a1a
parent 1500 a222eb109e52
child 1504 4b14c60ecb2b
     1.1 --- a/gui/broken_edge.cc	Thu Jun 16 18:58:15 2005 +0000
     1.2 +++ b/gui/broken_edge.cc	Fri Jun 17 12:25:53 2005 +0000
     1.3 @@ -2,7 +2,7 @@
     1.4  #include <lemon/xy.h>
     1.5  #include <math.h>
     1.6  
     1.7 -BrokenEdge::BrokenEdge(Gnome::Canvas::Group & g, Gnome::Canvas::Points p) : Line(g), isbutton(false)
     1.8 +BrokenEdge::BrokenEdge(Gnome::Canvas::Group & g, Gnome::Canvas::Points p, GraphDisplayerCanvas & gc) : Line(g), gdc(gc), isbutton(false)
     1.9  {
    1.10    my_points=new Gnome::Art::Point[3];
    1.11  
    1.12 @@ -110,9 +110,12 @@
    1.13      {
    1.14      case GDK_BUTTON_PRESS:
    1.15        //we mark the location of the event to be able to calculate parameters of dragging
    1.16 -      clicked_x=e->button.x;
    1.17 -      clicked_y=e->button.y;
    1.18 -      isbutton=true;
    1.19 +      if(gdc.get_actual_tool()!=CREATE_NODE)
    1.20 +	{
    1.21 +	  clicked_x=e->button.x;
    1.22 +	  clicked_y=e->button.y;
    1.23 +	  isbutton=true;
    1.24 +	}
    1.25        break;
    1.26      case GDK_BUTTON_RELEASE:
    1.27        isbutton=false;