COIN-OR::LEMON - Graph Library

Changeset 1838:b61682f0ee96 in lemon-0.x for gui/mw-mapselector.cc


Ignore:
Timestamp:
11/30/05 14:24:23 (15 years ago)
Author:
Hegyi Péter
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2391
Message:

MapWin? is created and disposed from now instead of being show and hide.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gui/mw-mapselector.cc

    r1837 r1838  
    11#include "map_win.h"
    22
    3 MapWin::MapSelector::MapSelector(std::vector<std::string> ml, int identifier, bool edge):id(identifier),itisedge(edge),default_state(true),set_new_map(false)
     3MapWin::MapSelector::MapSelector(std::vector<std::string> ml, std::string act, int identifier, bool edge):id(identifier),itisedge(edge),set_new_map(false)
    44{
    55  update_list(ml);
    66
    7   cbt.set_active(0);
     7  if(act=="")
     8    {
     9      cbt.set_active(0);
     10      default_state=true;
     11    }
     12  else
     13    {
     14      cbt.set_active_text((Glib::ustring)act);
     15      default_state=false;
     16    }
    817
    918  //binding signal to the actual entry
     
    5665void MapWin::MapSelector::update_list( std::vector< std::string > ml )
    5766{
     67  int prev_act=cbt.get_active_row_number();
    5868  cbt.clear();
    5969  std::vector< std::string >::iterator emsi=ml.begin();
     
    6373    }
    6474  cbt.prepend_text("Default values");
     75  if(prev_act!=-1)
     76    {
     77      cbt.set_active(prev_act);
     78    }
    6579}
    6680
     
    7892  else if((!default_state)&&(cbt.get_active_row_number()==0))
    7993    {
    80       signal_cbt.emit("");
    8194      reset();
    8295    }
     
    8699{
    87100  default_state=true;
     101
    88102  cbt.set_active(0);
    89103
Note: See TracChangeset for help on using the changeset viewer.