mirror of
https://github.com/glest/glest-source.git
synced 2025-10-02 18:36:48 +02:00
- bugfix when reloading saved settings and item doesn't exist in listbox (thanks tomryen)
This commit is contained in:
@@ -334,6 +334,16 @@ void GraphicListBox::setEditable(bool editable){
|
||||
GraphicComponent::setEditable(editable);
|
||||
}
|
||||
|
||||
bool GraphicListBox::hasItem(string item) const {
|
||||
bool result = false;
|
||||
vector<string>::const_iterator iter= find(items.begin(), items.end(), item);
|
||||
if(iter != items.end()) {
|
||||
result = true;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
void GraphicListBox::setSelectedItem(string item, bool errorOnMissing){
|
||||
vector<string>::iterator iter;
|
||||
|
||||
|
Reference in New Issue
Block a user