1.1 --- a/gui/graph_displayer_canvas-event.cc Fri Aug 26 11:03:59 2005 +0000
1.2 +++ b/gui/graph_displayer_canvas-event.cc Fri Aug 26 11:37:41 2005 +0000
1.3 @@ -141,12 +141,8 @@
1.4 clicked_x=new_x;
1.5 clicked_y=new_y;
1.6
1.7 - //all the edges connected to the moved point has to be redrawn
1.8 - EdgeIt ei;
1.9
1.10 - mapstorage.graph.firstOut(ei,active_node);
1.11 -
1.12 - for(;ei!=INVALID;mapstorage.graph.nextOut(ei))
1.13 + for(OutEdgeIt ei(mapstorage.graph,active_node);ei!=INVALID;++ei)
1.14 {
1.15 Gnome::Canvas::Points coos;
1.16 double x1, x2, y1, y2;
1.17 @@ -173,8 +169,7 @@
1.18 edgetextmap[ei]->property_y().set_value(text_pos.y);
1.19 }
1.20
1.21 - mapstorage.graph.firstIn(ei,active_node);
1.22 - for(;ei!=INVALID;mapstorage.graph.nextIn(ei))
1.23 + for(InEdgeIt ei(mapstorage.graph,active_node);ei!=INVALID;++ei)
1.24 {
1.25 Gnome::Canvas::Points coos;
1.26 double x1, x2, y1, y2;
1.27 @@ -483,24 +478,23 @@
1.28 {
1.29 mapstorage.modified = true;
1.30
1.31 - //collecting edges to delete
1.32 - EdgeIt e;
1.33 std::set<Graph::Edge> edges_to_delete;
1.34
1.35 - mapstorage.graph.firstOut(e,active_node);
1.36 - for(;e!=INVALID;mapstorage.graph.nextOut(e))
1.37 + for(OutEdgeIt e(mapstorage.graph,active_node);e!=INVALID;++e)
1.38 {
1.39 edges_to_delete.insert(e);
1.40 }
1.41 -
1.42 - mapstorage.graph.firstIn(e,active_node);
1.43 - for(;e!=INVALID;mapstorage.graph.nextIn(e))
1.44 +
1.45 + for(InEdgeIt e(mapstorage.graph,active_node);e!=INVALID;++e)
1.46 {
1.47 edges_to_delete.insert(e);
1.48 }
1.49 -
1.50 +
1.51 //deleting collected edges
1.52 - for(std::set<Graph::Edge>::iterator edge_set_it=edges_to_delete.begin();edge_set_it!=edges_to_delete.end();edge_set_it++)
1.53 + for(std::set<Graph::Edge>::iterator
1.54 + edge_set_it=edges_to_delete.begin();
1.55 + edge_set_it!=edges_to_delete.end();
1.56 + ++edge_set_it)
1.57 {
1.58 deleteItem(*edge_set_it);
1.59 }