Result of KruskalGUIAlgo is refreshed if displayed, but no more setin a forced way.
authorhegyi
Fri, 06 Jan 2006 13:58:49 +0000
changeset 1881f40cdc2057c2
parent 1880 0d6da6e6a775
child 1882 2c3f6c7e01b4
Result of KruskalGUIAlgo is refreshed if displayed, but no more setin a forced way.
gui/kruskalbox.cc
gui/mapstorage.cc
gui/mapstorage.h
     1.1 --- a/gui/kruskalbox.cc	Fri Jan 06 10:42:58 2006 +0000
     1.2 +++ b/gui/kruskalbox.cc	Fri Jan 06 13:58:49 2006 +0000
     1.3 @@ -32,11 +32,13 @@
     1.4    std::ostringstream o;
     1.5    o << "Result: " << res;
     1.6    resultlabel.set_text(o.str());
     1.7 +
     1.8 +  mapstorage->mapChanged(true, (edgemapcbts[OUTPUT])->get_active_text());
     1.9 +  //   mapstorage->changeActiveMap(true, E_COLOR,
    1.10 +  // 			      (edgemapcbts[OUTPUT])->get_active_text());
    1.11 +  //   mapstorage->changeActiveMap(true, E_TEXT,
    1.12 +  // 			      (edgemapcbts[INPUT])->get_active_text());
    1.13    
    1.14 -  mapstorage->changeActiveMap(true, E_COLOR,
    1.15 -			      (edgemapcbts[OUTPUT])->get_active_text());
    1.16 -  mapstorage->changeActiveMap(true, E_TEXT,
    1.17 -			      (edgemapcbts[INPUT])->get_active_text());
    1.18  }
    1.19      
    1.20  void KruskalBox::build_box()
     2.1 --- a/gui/mapstorage.cc	Fri Jan 06 10:42:58 2006 +0000
     2.2 +++ b/gui/mapstorage.cc	Fri Jan 06 13:58:49 2006 +0000
     2.3 @@ -438,3 +438,27 @@
     2.4  {
     2.5    arrow_pos_read_ok = true;
     2.6  }
     2.7 +
     2.8 +void MapStorage::mapChanged(bool itisedge, std::string mapname)
     2.9 +{
    2.10 +  if(itisedge)
    2.11 +    {
    2.12 +      for(int i=0;i<EDGE_PROPERTY_NUM;i++)
    2.13 +	{
    2.14 +	  if(active_edgemaps[i]==mapname)
    2.15 +	    {
    2.16 +	      signal_prop.emit(itisedge, i);
    2.17 +	    }
    2.18 +	}
    2.19 +    }
    2.20 +  else
    2.21 +    {
    2.22 +      for(int i=0;i<NODE_PROPERTY_NUM;i++)
    2.23 +	{
    2.24 +	  if(active_nodemaps[i]==mapname)
    2.25 +	    {
    2.26 +	      signal_prop.emit(itisedge, i);
    2.27 +	    }
    2.28 +	}
    2.29 +    }
    2.30 +}
     3.1 --- a/gui/mapstorage.h	Fri Jan 06 10:42:58 2006 +0000
     3.2 +++ b/gui/mapstorage.h	Fri Jan 06 13:58:49 2006 +0000
     3.3 @@ -133,6 +133,8 @@
     3.4    ///To be able to iterate through each maps this function returns an iterator pointing to the last edgemap in the storage.
     3.5    std::map< std::string,Graph::EdgeMap<double> * >::iterator endOfEdgeMaps(){return edgemap_storage.end();};
     3.6  
     3.7 +  void mapChanged(bool, std::string);
     3.8 +
     3.9    int readFromFile(const std::string &);
    3.10    void writeToFile(const std::string &);
    3.11