Changeset 1879:01d41844ef46 in lemon-0.x for gui/graph_displayer_canvas-event.cc
- Timestamp:
- 01/05/06 17:54:34 (17 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2454
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gui/graph_displayer_canvas-event.cc
r1860 r1879 851 851 } 852 852 } 853 854 } 855 856 int GraphDisplayerCanvas::addNewEdgeMap(double default_value, std::string mapname) 857 { 858 //create the new map 859 Graph::EdgeMap<double> * emptr=new Graph::EdgeMap<double> ((mytab.mapstorage).graph, default_value); 860 861 //if addition was not successful addEdgeMap returns one. 862 //cause can be that there is already a map named like the new one 863 if((mytab.mapstorage).addEdgeMap(mapname,emptr, default_value)) 864 { 865 return 1; 866 } 867 868 869 //add it to the list of the displayable maps 870 mytab.registerNewEdgeMap(mapname); 871 872 //display it 873 changeEdgeText(mapname); 874 875 return 0; 876 } 877 878 int GraphDisplayerCanvas::addNewNodeMap(double default_value, std::string mapname) 879 { 880 //create the new map 881 Graph::NodeMap<double> * emptr=new Graph::NodeMap<double> ((mytab.mapstorage).graph,default_value); 882 883 //if addition was not successful addNodeMap returns one. 884 //cause can be that there is already a map named like the new one 885 if((mytab.mapstorage).addNodeMap(mapname,emptr, default_value)) 886 { 887 return 1; 888 } 889 890 //add it to the list of the displayable maps 891 mytab.registerNewNodeMap(mapname); 892 893 //display it 894 changeNodeText(mapname); 895 896 return 0; 897 } 898 853 }
Note: See TracChangeset
for help on using the changeset viewer.