aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects/ListBox.cs
diff options
context:
space:
mode:
authorjp <jp_bruyere@hotmail.com>2016-02-27 11:56:36 +0100
committerjp <jp_bruyere@hotmail.com>2016-02-27 11:56:36 +0100
commit04fa15edebb733e4b7488063767f08ad2fa4d492 (patch)
tree46f55b38e0cf2cf4ee07a6618a225c7faaeb1b7a /src/GraphicObjects/ListBox.cs
parent4320d25aceb64189f4a2a38312698c3c4a319714 (diff)
test selectedIndex<0 in listbox
Diffstat (limited to 'src/GraphicObjects/ListBox.cs')
-rw-r--r--src/GraphicObjects/ListBox.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/GraphicObjects/ListBox.cs b/src/GraphicObjects/ListBox.cs
index 4a188200..0d80479a 100644
--- a/src/GraphicObjects/ListBox.cs
+++ b/src/GraphicObjects/ListBox.cs
@@ -93,7 +93,7 @@ namespace Crow
}
}
public object SelectedItem{
- get { return data == null ? "none" : data[_selectedIndex]; }
+ get { return data == null ? null : _selectedIndex < 0 ? null : data[_selectedIndex]; }
}
[XmlAttributeAttribute]//[DefaultValue(null)]
public IList Data {