Made sure sysData.selectedIndices() returns an empty slice if nothing was selected in a single-selection listbox.
This commit is contained in:
parent
063293456d
commit
c67191094f
|
@ -363,7 +363,11 @@ func (s *sysData) selectedIndex() int {
|
||||||
|
|
||||||
func (s *sysData) selectedIndices() []int {
|
func (s *sysData) selectedIndices() []int {
|
||||||
if !s.alternate { // single-selection list box; use single-selection method
|
if !s.alternate { // single-selection list box; use single-selection method
|
||||||
return []int{s.selectedIndex()}
|
index := s.selectedIndex()
|
||||||
|
if index == -1 {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return []int{index}
|
||||||
}
|
}
|
||||||
|
|
||||||
ret := make(chan uiret)
|
ret := make(chan uiret)
|
||||||
|
|
Loading…
Reference in New Issue