1.1 --- a/gui/broken_edge.cc Fri Jun 17 15:41:48 2005 +0000
1.2 +++ b/gui/broken_edge.cc Fri Jun 17 17:08:45 2005 +0000
1.3 @@ -1,5 +1,4 @@
1.4 #include <broken_edge.h>
1.5 -#include <lemon/xy.h>
1.6 #include <math.h>
1.7
1.8 BrokenEdge::BrokenEdge(Gnome::Canvas::Group & g, Gnome::Canvas::Points p, GraphDisplayerCanvas & gc) : Line(g), gdc(gc), isbutton(false)
1.9 @@ -112,13 +111,18 @@
1.10 //we mark the location of the event to be able to calculate parameters of dragging
1.11 if(gdc.get_actual_tool()!=CREATE_NODE)
1.12 {
1.13 + gdc.toggle_edge_activity(this, true);
1.14 clicked_x=e->button.x;
1.15 clicked_y=e->button.y;
1.16 isbutton=true;
1.17 }
1.18 break;
1.19 case GDK_BUTTON_RELEASE:
1.20 - isbutton=false;
1.21 + if(gdc.get_actual_tool()!=CREATE_NODE)
1.22 + {
1.23 + gdc.toggle_edge_activity(this, false);
1.24 + isbutton=false;
1.25 + }
1.26 break;
1.27 case GDK_MOTION_NOTIFY:
1.28 //we only have to do sg. if the mouse button is pressed
1.29 @@ -139,6 +143,7 @@
1.30 points_new.push_back(my_points[2]);
1.31
1.32 set_points(points_new);
1.33 + gdc.text_reposition(xy<double>(my_points[1].get_x(),my_points[1].get_y()));
1.34
1.35 clicked_x=e->motion.x;
1.36 clicked_y=e->motion.y;
1.37 @@ -149,3 +154,9 @@
1.38
1.39 return true;
1.40 }
1.41 +
1.42 +xy<double> BrokenEdge::get_arrow_pos()
1.43 +{
1.44 + xy<double> ret_val(my_points[1].get_x(),my_points[1].get_y());
1.45 + return ret_val;
1.46 +}