1.1 --- a/mapselector.cc Thu Jan 12 13:28:54 2006 +0000
1.2 +++ b/mapselector.cc Thu Jan 12 14:36:08 2006 +0000
1.3 @@ -26,13 +26,17 @@
1.4
1.5 label->set_width_chars(longest_property_string_length);
1.6
1.7 - defbut=new Gtk::Button();
1.8 - defbut->set_label("Reset");
1.9 -
1.10 - defbut->signal_pressed().connect
1.11 - (
1.12 - sigc::mem_fun(*this, &MapSelector::reset)
1.13 - );
1.14 + defbut=NULL;
1.15 + if(def)
1.16 + {
1.17 + defbut=new Gtk::Button();
1.18 + defbut->set_label("Reset");
1.19 +
1.20 + defbut->signal_pressed().connect
1.21 + (
1.22 + sigc::mem_fun(*this, &MapSelector::reset)
1.23 + );
1.24 + }
1.25
1.26 newbut=new Gtk::Button(Gtk::Stock::NEW);
1.27
1.28 @@ -45,7 +49,11 @@
1.29
1.30 add(cbt);
1.31
1.32 - add(*defbut);
1.33 + if(def)
1.34 + {
1.35 + add(*defbut);
1.36 + }
1.37 +
1.38 add(*newbut);
1.39 }
1.40
1.41 @@ -76,7 +84,7 @@
1.42
1.43 void MapSelector::comboChanged()
1.44 {
1.45 - if(cbt.get_active_row_number()!=0)
1.46 + if(cbt.get_active_row_number()!=0 || !def)
1.47 {
1.48 default_state=false;
1.49 Glib::ustring mapname = cbt.get_active_text();