[Lemon-commits] [lemon_svn] ladanyi: r2458 - hugo/trunk/gui
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 20:52:50 CET 2006
Author: ladanyi
Date: Fri Jan 6 15:44:04 2006
New Revision: 2458
Modified:
hugo/trunk/gui/graph_displayer_canvas-event.cc
Log:
Set arrow coordinates when creating a new edge.
Modified: hugo/trunk/gui/graph_displayer_canvas-event.cc
==============================================================================
--- hugo/trunk/gui/graph_displayer_canvas-event.cc (original)
+++ hugo/trunk/gui/graph_displayer_canvas-event.cc Fri Jan 6 15:44:04 2006
@@ -453,6 +453,12 @@
target_item->get_bounds(x1, y1, x2, y2);
coos.push_back(Gnome::Art::Point((x1+x2)/2,(y1+y2)/2));
+ // set the coordinates of the arrow on the new edge
+ MapStorage& ms = mytab.mapstorage;
+ ms.arrow_pos.set(active_edge,
+ (ms.coords[ms.graph.source(active_edge)] +
+ ms.coords[ms.graph.target(active_edge)])/ 2.0);
+
//drawing new edge
edgesmap[active_edge]=new BrokenEdge(displayed_graph, active_edge,
*this);
More information about the Lemon-commits
mailing list