Changeset 1525:6d94de269ab1 in lemon-0.x for gui/map_win.cc
- Timestamp:
- 06/29/05 21:44:30 (18 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2011
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gui/map_win.cc
r1524 r1525 24 24 for(int i=0;i<EDGE_PROPERTY_NUM;i++) 25 25 { 26 27 std::map< std::string,Graph::EdgeMap<double> * >::iterator emsi=ms.beginOfEdgeMaps();28 std::set<int> props;29 30 int actprop;31 32 //here we find out, which map is the default in MapStorage for this property, which are not33 for(int j=0;j<ms.numOfEdgeMaps();j++)34 {35 //this is the default value for this property36 if(emsi->second==&(ms.default_edgemaps[i]))37 {38 actprop=j;39 }40 //these are the maps NOT to show for this property41 for(int k=0;k<EDGE_PROPERTY_NUM;k++)42 {43 if(emsi->second==&(ms.default_edgemaps[k]))44 {45 props.insert(j);46 }47 }48 emsi++;49 }50 51 26 //filling in combo box with choices 52 27 std::list<Glib::ustring> listStrings; … … 54 29 listStrings.push_back("Default"); 55 30 56 emsi=ms.beginOfEdgeMaps(); 57 58 for(int j=0;j<ms.numOfEdgeMaps();j++) 59 { 60 if( ( props.find(j) )==( props.end() ) ) 61 { 31 std::map< std::string,Graph::EdgeMap<double> * >::iterator emsi=ms.beginOfEdgeMaps(); 32 for(;emsi!=ms.endOfEdgeMaps();emsi++) 33 { 62 34 listStrings.push_back(emsi->first); 63 }64 emsi++;65 35 } 66 36 … … 103 73 for(int i=0;i<NODE_PROPERTY_NUM;i++) 104 74 { 105 106 std::map< std::string,Graph::NodeMap<double> * >::iterator emsi=ms.beginOfNodeMaps();107 std::set<int> props;108 109 int actprop;110 111 //here we find out, which map is the default in MapStorage for this property, which are not112 for(int j=0;j<ms.numOfNodeMaps();j++)113 {114 //these are the maps NOT to show for this property115 if(emsi->second==&(ms.default_nodemaps[i]))116 {117 actprop=j;118 }119 //this is the other maps to show for this property120 for(int k=0;k<NODE_PROPERTY_NUM;k++)121 {122 if(emsi->second==&(ms.default_nodemaps[k]))123 {124 props.insert(j);125 }126 }127 emsi++;128 }129 130 75 //filling in combo box with choices 131 76 std::list<Glib::ustring> listStrings; … … 133 78 listStrings.push_back("Default"); 134 79 135 emsi=ms.beginOfNodeMaps(); 136 137 for(int j=0;j<ms.numOfNodeMaps();j++) 138 { 139 if( ( props.find(j) )==( props.end() ) ) 140 { 141 listStrings.push_back(emsi->first); 142 } 143 emsi++; 80 std::map< std::string,Graph::NodeMap<double> * >::iterator emsi=ms.beginOfNodeMaps(); 81 82 for(;emsi!=ms.endOfNodeMaps();emsi++) 83 { 84 listStrings.push_back(emsi->first); 144 85 } 145 86 … … 189 130 if(!(mapname.empty())) //We seem to get 2 signals, one when the text is empty. 190 131 { 191 if(mapname=="Default") 192 { 193 mapname=edge_property_strings[prop]; 194 } 195 196 if( (ms.edgemap_storage).find(mapname) != (ms.edgemap_storage).end() ) 132 if( ( (ms.edgemap_storage).find(mapname) != (ms.edgemap_storage).end() ) || (mapname=="Default") ) 197 133 { 198 134 switch(prop) … … 225 161 if(!(mapname.empty())) //We seem to get 2 signals, one when the text is empty. 226 162 { 227 if(mapname=="Default") 228 { 229 mapname=node_property_strings[prop]; 230 } 231 232 if( (ms.nodemap_storage).find(mapname) != (ms.nodemap_storage).end() ) 163 if( ( (ms.nodemap_storage).find(mapname) != (ms.nodemap_storage).end() ) || (mapname=="Default") ) 233 164 { 234 165 switch(prop) … … 262 193 if(!(mapname.empty())) //We seem to get 2 signals, one when the text is empty. 263 194 { 264 if(mapname=="Default") 265 { 266 mapname=node_property_strings[i]; 267 } 268 269 if( (ms.nodemap_storage).find(mapname) != (ms.nodemap_storage).end() ) 195 if( ( (ms.nodemap_storage).find(mapname) != (ms.nodemap_storage).end() ) || (mapname=="Default") ) 270 196 { 271 197 switch(i) 272 198 { 273 199 case N_RADIUS: 274 //gdc.changeNodeRadius(mapname, node); 275 std::cout << "If default map-value problem is solved, uncomment line in MapWin::node_update!" << std::endl; 200 gdc.changeNodeRadius(mapname, node); 276 201 break; 277 202 case N_COLOR: … … 302 227 if(!(mapname.empty())) //We seem to get 2 signals, one when the text is empty. 303 228 { 304 if(mapname=="Default") 305 { 306 mapname=edge_property_strings[i]; 307 } 308 309 if( (ms.edgemap_storage).find(mapname) != (ms.edgemap_storage).end() ) 229 230 if( ( (ms.edgemap_storage).find(mapname) != (ms.edgemap_storage).end() ) || (mapname=="Default") ) 310 231 { 311 232 switch(i) 312 233 { 313 234 case E_WIDTH: 314 //gdc.changeEdgeWidth(mapname, edge); 315 std::cout << "If default map-value problem is solved, uncomment line in MapWin::edge_update!" << std::endl; 235 gdc.changeEdgeWidth(mapname, edge); 316 236 break; 317 237 case E_COLOR:
Note: See TracChangeset
for help on using the changeset viewer.