equal
deleted
inserted
replaced
65 |
65 |
66 void MapSelector::update_list( std::vector< std::string > ml ) |
66 void MapSelector::update_list( std::vector< std::string > ml ) |
67 { |
67 { |
68 int prev_act=cbt.get_active_row_number(); |
68 int prev_act=cbt.get_active_row_number(); |
69 cbt.clear(); |
69 cbt.clear(); |
|
70 cbt_content.clear(); |
70 std::vector< std::string >::iterator emsi=ml.begin(); |
71 std::vector< std::string >::iterator emsi=ml.begin(); |
71 for(;emsi!=ml.end();emsi++) |
72 for(;emsi!=ml.end();emsi++) |
72 { |
73 { |
73 cbt.append_text(*emsi); |
74 cbt.append_text(*emsi); |
|
75 cbt_content.push_back(*emsi); |
74 } |
76 } |
75 if(def) |
77 if(def) |
76 { |
78 { |
77 cbt.prepend_text("Default values"); |
79 cbt.prepend_text("Default values"); |
|
80 cbt_content.push_back("Default values"); |
78 } |
81 } |
79 if(prev_act!=-1) |
82 if(prev_act!=-1) |
80 { |
83 { |
81 cbt.set_active(prev_act); |
84 cbt.set_active(prev_act); |
82 } |
85 } |
114 return cbt.get_active_text(); |
117 return cbt.get_active_text(); |
115 } |
118 } |
116 |
119 |
117 void MapSelector::set_active_text(Glib::ustring text) |
120 void MapSelector::set_active_text(Glib::ustring text) |
118 { |
121 { |
119 cbt.set_active_text(text); |
122 if(text.compare("")) |
|
123 { |
|
124 cbt.set_active_text(text); |
|
125 } |
|
126 else |
|
127 { |
|
128 cbt.set_active_text("Default values"); |
|
129 } |
120 } |
130 } |
121 |
131 |
122 void MapSelector::append_text(Glib::ustring text) |
132 void MapSelector::append_text(Glib::ustring text) |
123 { |
133 { |
124 cbt.append_text(text); |
134 cbt.append_text(text); |
|
135 cbt_content.push_back(text); |
|
136 |
125 if(set_new_map) |
137 if(set_new_map) |
126 { |
138 { |
127 set_active_text(text); |
139 set_active_text(text); |
128 set_new_map=false; |
140 set_new_map=false; |
129 } |
141 } |