[Lemon-commits] [lemon_svn] alpar: r2164 - hugo/trunk/gui
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 20:50:38 CET 2006
Author: alpar
Date: Fri Aug 26 13:37:41 2005
New Revision: 2164
Modified:
hugo/trunk/gui/all_include.h
hugo/trunk/gui/graph_displayer_canvas-event.cc
Log:
No comment.
Modified: hugo/trunk/gui/all_include.h
==============================================================================
--- hugo/trunk/gui/all_include.h (original)
+++ hugo/trunk/gui/all_include.h Fri Aug 26 13:37:41 2005
@@ -42,6 +42,8 @@
typedef Graph::Node Node;
typedef Graph::Edge Edge;
typedef Graph::EdgeIt EdgeIt;
+typedef Graph::InEdgeIt InEdgeIt;
+typedef Graph::OutEdgeIt OutEdgeIt;
typedef Graph::NodeIt NodeIt;
const std::string prog_name = "LEMON Graph Editor";
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 Aug 26 13:37:41 2005
@@ -141,12 +141,8 @@
clicked_x=new_x;
clicked_y=new_y;
- //all the edges connected to the moved point has to be redrawn
- EdgeIt ei;
- mapstorage.graph.firstOut(ei,active_node);
-
- for(;ei!=INVALID;mapstorage.graph.nextOut(ei))
+ for(OutEdgeIt ei(mapstorage.graph,active_node);ei!=INVALID;++ei)
{
Gnome::Canvas::Points coos;
double x1, x2, y1, y2;
@@ -173,8 +169,7 @@
edgetextmap[ei]->property_y().set_value(text_pos.y);
}
- mapstorage.graph.firstIn(ei,active_node);
- for(;ei!=INVALID;mapstorage.graph.nextIn(ei))
+ for(InEdgeIt ei(mapstorage.graph,active_node);ei!=INVALID;++ei)
{
Gnome::Canvas::Points coos;
double x1, x2, y1, y2;
@@ -483,24 +478,23 @@
{
mapstorage.modified = true;
- //collecting edges to delete
- EdgeIt e;
std::set<Graph::Edge> edges_to_delete;
- mapstorage.graph.firstOut(e,active_node);
- for(;e!=INVALID;mapstorage.graph.nextOut(e))
+ for(OutEdgeIt e(mapstorage.graph,active_node);e!=INVALID;++e)
{
edges_to_delete.insert(e);
}
-
- mapstorage.graph.firstIn(e,active_node);
- for(;e!=INVALID;mapstorage.graph.nextIn(e))
+
+ for(InEdgeIt e(mapstorage.graph,active_node);e!=INVALID;++e)
{
edges_to_delete.insert(e);
}
-
+
//deleting collected edges
- for(std::set<Graph::Edge>::iterator edge_set_it=edges_to_delete.begin();edge_set_it!=edges_to_delete.end();edge_set_it++)
+ for(std::set<Graph::Edge>::iterator
+ edge_set_it=edges_to_delete.begin();
+ edge_set_it!=edges_to_delete.end();
+ ++edge_set_it)
{
deleteItem(*edge_set_it);
}
More information about the Lemon-commits
mailing list