- bugfix when reloading saved settings and item doesn't exist in listbox (thanks tomryen)

This commit is contained in:
Mark Vejvoda
2011-09-07 16:55:49 +00:00
parent b8010a18af
commit 56a384e365
3 changed files with 21 additions and 2 deletions

View File

@@ -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;