summaryrefslogtreecommitdiff
path: root/client/widgets/combobox.cc
diff options
context:
space:
mode:
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;
}