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

Top image is selected at start, and better synchronisation between image list and display panels

parent b8bb7f75
No related branches found
No related tags found
No related merge requests found
...@@ -49,8 +49,8 @@ class ImageListPanel(wx.Panel): ...@@ -49,8 +49,8 @@ class ImageListPanel(wx.Panel):
# changed # changed
for i,image in enumerate(imageList): for i,image in enumerate(imageList):
self._makeDisplayPanel(image) self._makeDisplayPanel(image)
self._showDisplayPanel(0) self._showDisplayPanel(len(imageList)-1)
self.Layout() self.Layout()
...@@ -98,6 +98,8 @@ class ImageListPanel(wx.Panel): ...@@ -98,6 +98,8 @@ class ImageListPanel(wx.Panel):
'displayPanel_{}'.format(id(self))) 'displayPanel_{}'.format(id(self)))
displayPanel.Show(i == idx) displayPanel.Show(i == idx)
self.listBox.SetSelection(idx)
self.Layout() self.Layout()
self.Refresh() self.Refresh()
......
...@@ -183,6 +183,8 @@ class EditableListBox(wx.Panel): ...@@ -183,6 +183,8 @@ class EditableListBox(wx.Panel):
# These methods simply wrap the same-named wx.ListBox methods, # These methods simply wrap the same-named wx.ListBox methods,
# while supporting the ELB_REVERSE style. # while supporting the ELB_REVERSE style.
# #
def GetCount(self): return self.listBox.GetCount()
def SetSelection(self, n): def SetSelection(self, n):
self.listBox.SetSelection(self._fixIndex(n)) self.listBox.SetSelection(self._fixIndex(n))
......
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