COIN-OR::LEMON - Graph Library

Changeset 1892:1d384b30157f in lemon-0.x for gui/mapselector.cc


Ignore:
Timestamp:
01/12/06 15:36:08 (14 years ago)
Author:
Hegyi Péter
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2467
Message:

Documentation of MapSelector?. If no default value is present in MapSelector?, Reset button does not appear.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gui/mapselector.cc

    r1884 r1892  
    2727  label->set_width_chars(longest_property_string_length);
    2828
    29   defbut=new Gtk::Button();
    30   defbut->set_label("Reset");
    31 
    32   defbut->signal_pressed().connect
    33     (
    34      sigc::mem_fun(*this, &MapSelector::reset)
    35      );
     29  defbut=NULL;
     30  if(def)
     31    {
     32      defbut=new Gtk::Button();
     33      defbut->set_label("Reset");
     34     
     35      defbut->signal_pressed().connect
     36        (
     37         sigc::mem_fun(*this, &MapSelector::reset)
     38         );
     39    }
    3640
    3741  newbut=new Gtk::Button(Gtk::Stock::NEW);
     
    4650  add(cbt);
    4751
    48   add(*defbut);
     52  if(def)
     53    {
     54      add(*defbut);
     55    }
     56
    4957  add(*newbut);
    5058}
     
    7785void MapSelector::comboChanged()
    7886{
    79   if(cbt.get_active_row_number()!=0)
     87  if(cbt.get_active_row_number()!=0 || !def)
    8088    {
    8189      default_state=false;
Note: See TracChangeset for help on using the changeset viewer.