]> O.S.I.I.S - jp/crow.git/commitdiff
test selectedIndex<0 in listbox
authorjp <jp_bruyere@hotmail.com>
Sat, 27 Feb 2016 10:56:36 +0000 (11:56 +0100)
committerjp <jp_bruyere@hotmail.com>
Sat, 27 Feb 2016 10:56:36 +0000 (11:56 +0100)
src/GraphicObjects/ListBox.cs

index 4a188200e396d6ae9dbbf2a784e9bc83136a0f5d..0d80479ae8df81dbc16b02d5bd5622e1e8306945 100644 (file)
@@ -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 {