1.1 --- a/map_win.cc Wed Jun 29 15:41:33 2005 +0000
1.2 +++ b/map_win.cc Wed Jun 29 19:44:30 2005 +0000
1.3 @@ -23,45 +23,15 @@
1.4
1.5 for(int i=0;i<EDGE_PROPERTY_NUM;i++)
1.6 {
1.7 -
1.8 - std::map< std::string,Graph::EdgeMap<double> * >::iterator emsi=ms.beginOfEdgeMaps();
1.9 - std::set<int> props;
1.10 -
1.11 - int actprop;
1.12 -
1.13 - //here we find out, which map is the default in MapStorage for this property, which are not
1.14 - for(int j=0;j<ms.numOfEdgeMaps();j++)
1.15 - {
1.16 - //this is the default value for this property
1.17 - if(emsi->second==&(ms.default_edgemaps[i]))
1.18 - {
1.19 - actprop=j;
1.20 - }
1.21 - //these are the maps NOT to show for this property
1.22 - for(int k=0;k<EDGE_PROPERTY_NUM;k++)
1.23 - {
1.24 - if(emsi->second==&(ms.default_edgemaps[k]))
1.25 - {
1.26 - props.insert(j);
1.27 - }
1.28 - }
1.29 - emsi++;
1.30 - }
1.31 -
1.32 //filling in combo box with choices
1.33 std::list<Glib::ustring> listStrings;
1.34
1.35 listStrings.push_back("Default");
1.36
1.37 - emsi=ms.beginOfEdgeMaps();
1.38 -
1.39 - for(int j=0;j<ms.numOfEdgeMaps();j++)
1.40 + std::map< std::string,Graph::EdgeMap<double> * >::iterator emsi=ms.beginOfEdgeMaps();
1.41 + for(;emsi!=ms.endOfEdgeMaps();emsi++)
1.42 {
1.43 - if( ( props.find(j) )==( props.end() ) )
1.44 - {
1.45 listStrings.push_back(emsi->first);
1.46 - }
1.47 - emsi++;
1.48 }
1.49
1.50 e_combo_array[i].set_popdown_strings(listStrings);
1.51 @@ -102,45 +72,16 @@
1.52
1.53 for(int i=0;i<NODE_PROPERTY_NUM;i++)
1.54 {
1.55 -
1.56 - std::map< std::string,Graph::NodeMap<double> * >::iterator emsi=ms.beginOfNodeMaps();
1.57 - std::set<int> props;
1.58 -
1.59 - int actprop;
1.60 -
1.61 - //here we find out, which map is the default in MapStorage for this property, which are not
1.62 - for(int j=0;j<ms.numOfNodeMaps();j++)
1.63 - {
1.64 - //these are the maps NOT to show for this property
1.65 - if(emsi->second==&(ms.default_nodemaps[i]))
1.66 - {
1.67 - actprop=j;
1.68 - }
1.69 - //this is the other maps to show for this property
1.70 - for(int k=0;k<NODE_PROPERTY_NUM;k++)
1.71 - {
1.72 - if(emsi->second==&(ms.default_nodemaps[k]))
1.73 - {
1.74 - props.insert(j);
1.75 - }
1.76 - }
1.77 - emsi++;
1.78 - }
1.79 -
1.80 //filling in combo box with choices
1.81 std::list<Glib::ustring> listStrings;
1.82
1.83 listStrings.push_back("Default");
1.84
1.85 - emsi=ms.beginOfNodeMaps();
1.86 + std::map< std::string,Graph::NodeMap<double> * >::iterator emsi=ms.beginOfNodeMaps();
1.87
1.88 - for(int j=0;j<ms.numOfNodeMaps();j++)
1.89 + for(;emsi!=ms.endOfNodeMaps();emsi++)
1.90 {
1.91 - if( ( props.find(j) )==( props.end() ) )
1.92 - {
1.93 - listStrings.push_back(emsi->first);
1.94 - }
1.95 - emsi++;
1.96 + listStrings.push_back(emsi->first);
1.97 }
1.98
1.99 n_combo_array[i].set_popdown_strings(listStrings);
1.100 @@ -188,12 +129,7 @@
1.101 Glib::ustring mapname = entry->get_text();
1.102 if(!(mapname.empty())) //We seem to get 2 signals, one when the text is empty.
1.103 {
1.104 - if(mapname=="Default")
1.105 - {
1.106 - mapname=edge_property_strings[prop];
1.107 - }
1.108 -
1.109 - if( (ms.edgemap_storage).find(mapname) != (ms.edgemap_storage).end() )
1.110 + if( ( (ms.edgemap_storage).find(mapname) != (ms.edgemap_storage).end() ) || (mapname=="Default") )
1.111 {
1.112 switch(prop)
1.113 {
1.114 @@ -224,12 +160,7 @@
1.115 Glib::ustring mapname = entry->get_text();
1.116 if(!(mapname.empty())) //We seem to get 2 signals, one when the text is empty.
1.117 {
1.118 - if(mapname=="Default")
1.119 - {
1.120 - mapname=node_property_strings[prop];
1.121 - }
1.122 -
1.123 - if( (ms.nodemap_storage).find(mapname) != (ms.nodemap_storage).end() )
1.124 + if( ( (ms.nodemap_storage).find(mapname) != (ms.nodemap_storage).end() ) || (mapname=="Default") )
1.125 {
1.126 switch(prop)
1.127 {
1.128 @@ -261,18 +192,12 @@
1.129 Glib::ustring mapname = entry->get_text();
1.130 if(!(mapname.empty())) //We seem to get 2 signals, one when the text is empty.
1.131 {
1.132 - if(mapname=="Default")
1.133 - {
1.134 - mapname=node_property_strings[i];
1.135 - }
1.136 -
1.137 - if( (ms.nodemap_storage).find(mapname) != (ms.nodemap_storage).end() )
1.138 + if( ( (ms.nodemap_storage).find(mapname) != (ms.nodemap_storage).end() ) || (mapname=="Default") )
1.139 {
1.140 switch(i)
1.141 {
1.142 case N_RADIUS:
1.143 - //gdc.changeNodeRadius(mapname, node);
1.144 - std::cout << "If default map-value problem is solved, uncomment line in MapWin::node_update!" << std::endl;
1.145 + gdc.changeNodeRadius(mapname, node);
1.146 break;
1.147 case N_COLOR:
1.148 gdc.changeNodeColor(mapname, node);
1.149 @@ -301,18 +226,13 @@
1.150 Glib::ustring mapname = entry->get_text();
1.151 if(!(mapname.empty())) //We seem to get 2 signals, one when the text is empty.
1.152 {
1.153 - if(mapname=="Default")
1.154 - {
1.155 - mapname=edge_property_strings[i];
1.156 - }
1.157
1.158 - if( (ms.edgemap_storage).find(mapname) != (ms.edgemap_storage).end() )
1.159 + if( ( (ms.edgemap_storage).find(mapname) != (ms.edgemap_storage).end() ) || (mapname=="Default") )
1.160 {
1.161 switch(i)
1.162 {
1.163 case E_WIDTH:
1.164 - //gdc.changeEdgeWidth(mapname, edge);
1.165 - std::cout << "If default map-value problem is solved, uncomment line in MapWin::edge_update!" << std::endl;
1.166 + gdc.changeEdgeWidth(mapname, edge);
1.167 break;
1.168 case E_COLOR:
1.169 gdc.changeEdgeColor(mapname, edge);