Set arrow coordinates when creating a new edge. gui
authorladanyi
Fri, 06 Jan 2006 14:44:04 +0000
branchgui
changeset 1137c2e71835de7
parent 112 3689cb170d3e
child 114 0ace7edbb06f
Set arrow coordinates when creating a new edge.
graph_displayer_canvas-event.cc
     1.1 --- a/graph_displayer_canvas-event.cc	Fri Jan 06 14:36:46 2006 +0000
     1.2 +++ b/graph_displayer_canvas-event.cc	Fri Jan 06 14:44:04 2006 +0000
     1.3 @@ -453,6 +453,12 @@
     1.4                target_item->get_bounds(x1, y1, x2, y2);
     1.5                coos.push_back(Gnome::Art::Point((x1+x2)/2,(y1+y2)/2));
     1.6  
     1.7 +              // set the coordinates of the arrow on the new edge
     1.8 +              MapStorage& ms = mytab.mapstorage;
     1.9 +              ms.arrow_pos.set(active_edge,
    1.10 +                  (ms.coords[ms.graph.source(active_edge)] +
    1.11 +                   ms.coords[ms.graph.target(active_edge)])/ 2.0);
    1.12 +
    1.13                //drawing new edge
    1.14                edgesmap[active_edge]=new BrokenEdge(displayed_graph, active_edge,
    1.15                    *this);