COIN-OR::LEMON - Graph Library

Ignore:
Timestamp:
07/27/05 13:19:35 (16 years ago)
Author:
Hegyi Péter
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2100
Message:

Sorry for the previous commit, it was not ready yet, but that damned up arrow... So in this new revision string-double and double-string conversion is corrected to a more C++ way.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gui/graph_displayer_canvas-event.cc

    r1594 r1596  
    752752                    mapvalue_ch[i]=mapvalue_str[i];
    753753                  }
    754  
    755                 double mapvalue_d=atof(mapvalue_ch);
    756 
     754             
    757755                //if the text in the entry was correct
    758756                if((point_num<=1)&&(valid_double))
    759757                  {
     758                    double mapvalue_d=atof(mapvalue_ch);
     759
     760                    //reconvert the double to string for the correct format
     761                    std::ostringstream ostr;
     762                    ostr << mapvalue_d;
     763
    760764                    //save the value to the correct place
    761765                    switch(actual_tool)
    762766                      {
    763767                      case EDGE_MAP_EDIT:
    764                         edgetextmap[active_edge]->property_text().set_value(mapvalue_str);
     768                        edgetextmap[active_edge]->property_text().set_value(ostr.str());
    765769                        (*(mapstorage.edgemap_storage)[edgemap_to_edit])[active_edge]=mapvalue_d;
    766770                        break;
    767771                      case NODE_MAP_EDIT:
    768                         nodetextmap[active_node]->property_text().set_value(mapvalue_str);
     772                        nodetextmap[active_node]->property_text().set_value(ostr.str());
    769773                        (*(mapstorage.nodemap_storage)[nodemap_to_edit])[active_node]=mapvalue_d;
    770774                        break;
Note: See TracChangeset for help on using the changeset viewer.