diff -r f70bbee5350a -r 66e85f44a66f graph_displayer_canvas-edge.cc --- a/graph_displayer_canvas-edge.cc Wed Jun 29 15:41:33 2005 +0000 +++ b/graph_displayer_canvas-edge.cc Wed Jun 29 19:44:30 2005 +0000 @@ -5,11 +5,21 @@ int GraphDisplayerCanvas::changeEdgeWidth (std::string mapname, Graph::Edge edge) { + Graph::EdgeMap * actual_map; + if(mapname=="Default") + { + actual_map=new Graph::EdgeMap(g,edge_property_defaults[E_WIDTH]); + } + else + { + actual_map=(mapstorage.edgemap_storage)[mapname]; + } + if(edge==INVALID) { for (EdgeIt i(g); i!=INVALID; ++i) { - int w=(int)(*(mapstorage.edgemap_storage)[mapname])[i]; + int w=(int)(*actual_map)[i]; if(w>=0) { edgesmap[i]->property_width_pixels().set_value(w); @@ -18,7 +28,7 @@ } else { - int w=(int)(*(mapstorage.edgemap_storage)[mapname])[edge]; + int w=(int)(*actual_map)[edge]; if(w>=0) { edgesmap[edge]->property_width_pixels().set_value(w); @@ -33,16 +43,35 @@ //function maps the range of the maximum and //the minimum of the nodemap to the range of //green in RGB + Graph::EdgeMap * actual_map; + if(mapname=="Default") + { + actual_map=new Graph::EdgeMap(g,edge_property_defaults[E_COLOR]); + } + else + { + actual_map=(mapstorage.edgemap_storage)[mapname]; + } + + double max, min; + + if(mapname!="Default") + { + max=mapstorage.maxOfEdgeMap(mapname); + min=mapstorage.minOfEdgeMap(mapname); + } + else + { + max=edge_property_defaults[E_COLOR]; + min=edge_property_defaults[E_COLOR]; + } + if(edge==INVALID) { - for (EdgeIt i(g); i!=INVALID; ++i) { - double w=(*(mapstorage.edgemap_storage)[mapname])[i]; - double max=mapstorage.maxOfEdgeMap(mapname); - double min=mapstorage.minOfEdgeMap(mapname); - - //std::cout<property_fill_color_gdk().set_value(color); } } else { - double w=(*(mapstorage.edgemap_storage)[mapname])[edge]; - double max=mapstorage.maxOfEdgeMap(mapname); - double min=mapstorage.minOfEdgeMap(mapname); - - //std::cout<