No comment.
1.1 --- a/gui/all_include.h Fri Aug 26 11:03:59 2005 +0000
1.2 +++ b/gui/all_include.h Fri Aug 26 11:37:41 2005 +0000
1.3 @@ -42,6 +42,8 @@
1.4 typedef Graph::Node Node;
1.5 typedef Graph::Edge Edge;
1.6 typedef Graph::EdgeIt EdgeIt;
1.7 +typedef Graph::InEdgeIt InEdgeIt;
1.8 +typedef Graph::OutEdgeIt OutEdgeIt;
1.9 typedef Graph::NodeIt NodeIt;
1.10
1.11 const std::string prog_name = "LEMON Graph Editor";
2.1 --- a/gui/graph_displayer_canvas-event.cc Fri Aug 26 11:03:59 2005 +0000
2.2 +++ b/gui/graph_displayer_canvas-event.cc Fri Aug 26 11:37:41 2005 +0000
2.3 @@ -141,12 +141,8 @@
2.4 clicked_x=new_x;
2.5 clicked_y=new_y;
2.6
2.7 - //all the edges connected to the moved point has to be redrawn
2.8 - EdgeIt ei;
2.9
2.10 - mapstorage.graph.firstOut(ei,active_node);
2.11 -
2.12 - for(;ei!=INVALID;mapstorage.graph.nextOut(ei))
2.13 + for(OutEdgeIt ei(mapstorage.graph,active_node);ei!=INVALID;++ei)
2.14 {
2.15 Gnome::Canvas::Points coos;
2.16 double x1, x2, y1, y2;
2.17 @@ -173,8 +169,7 @@
2.18 edgetextmap[ei]->property_y().set_value(text_pos.y);
2.19 }
2.20
2.21 - mapstorage.graph.firstIn(ei,active_node);
2.22 - for(;ei!=INVALID;mapstorage.graph.nextIn(ei))
2.23 + for(InEdgeIt ei(mapstorage.graph,active_node);ei!=INVALID;++ei)
2.24 {
2.25 Gnome::Canvas::Points coos;
2.26 double x1, x2, y1, y2;
2.27 @@ -483,24 +478,23 @@
2.28 {
2.29 mapstorage.modified = true;
2.30
2.31 - //collecting edges to delete
2.32 - EdgeIt e;
2.33 std::set<Graph::Edge> edges_to_delete;
2.34
2.35 - mapstorage.graph.firstOut(e,active_node);
2.36 - for(;e!=INVALID;mapstorage.graph.nextOut(e))
2.37 + for(OutEdgeIt e(mapstorage.graph,active_node);e!=INVALID;++e)
2.38 {
2.39 edges_to_delete.insert(e);
2.40 }
2.41 -
2.42 - mapstorage.graph.firstIn(e,active_node);
2.43 - for(;e!=INVALID;mapstorage.graph.nextIn(e))
2.44 +
2.45 + for(InEdgeIt e(mapstorage.graph,active_node);e!=INVALID;++e)
2.46 {
2.47 edges_to_delete.insert(e);
2.48 }
2.49 -
2.50 +
2.51 //deleting collected edges
2.52 - for(std::set<Graph::Edge>::iterator edge_set_it=edges_to_delete.begin();edge_set_it!=edges_to_delete.end();edge_set_it++)
2.53 + for(std::set<Graph::Edge>::iterator
2.54 + edge_set_it=edges_to_delete.begin();
2.55 + edge_set_it!=edges_to_delete.end();
2.56 + ++edge_set_it)
2.57 {
2.58 deleteItem(*edge_set_it);
2.59 }