summaryrefslogtreecommitdiff
path: root/client/widgets/combobox.cc
diff options
context:
space:
mode:
authorsenator <senator>2008-03-24 13:33:35 +0000
committersenator <senator>2008-03-24 13:33:35 +0000
commit917aea688614bd29568f7eb37efe8cbd2620b25c (patch)
tree568937b1a05890f5780500e5ae0696bd55cb1809 /client/widgets/combobox.cc
parent2e87c4608a9fb888fd7669756d8cb457ac305f71 (diff)
Fixed isValid for combobox and radiobuttons
Diffstat (limited to 'client/widgets/combobox.cc')
-rw-r--r--client/widgets/combobox.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/client/widgets/combobox.cc b/client/widgets/combobox.cc
index e60ea8e..29bf253 100644
--- a/client/widgets/combobox.cc
+++ b/client/widgets/combobox.cc
@@ -63,9 +63,14 @@ ComboBox::ComboBox(QDomNode node)
if(default_found == 0) setCurrentIndex(-1); // -1 is default for none selected
}
+bool ComboBox::isValid()
+{
+ return currentIndex() != -1;
+}
+
QString ComboBox::getValue()
{
- QString value = "none";
+ QString value;
if(currentIndex() != -1) value = itemData(currentIndex()).toString();
return value;
}