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