Skip to content
Snippets Groups Projects
Commit 45778a9b authored by Paul McCarthy's avatar Paul McCarthy
Browse files

ImageListPanel does not set selection on an empty EditableListBox.

parent dca16f16
No related branches found
No related tags found
No related merge requests found
......@@ -84,8 +84,9 @@ class ImageListPanel(wx.Panel):
if not self._listBoxNeedsUpdate:
return
self._listBox.SetSelection(self._imageList.selectedImage)
if len(self._imageList) > 0:
self._listBox.SetSelection(self._imageList.selectedImage)
def _imageListChanged(self, *a):
......@@ -108,7 +109,8 @@ class ImageListPanel(wx.Panel):
self._listBox.Append(image.name, image, image.imageFile)
self._listBox.SetSelection(selection)
if len(self._imageList) > 0:
self._listBox.SetSelection(selection)
def _lbMove(self, ev):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment