Merged skvorl/beremiz into default
authorPaul Beltyukov <beltyukov.p.a@gmail.com>
Mon, 12 Sep 2016 10:15:39 +0500
changeset 1529 0a131f6a4c86
parent 1528 d551f2925a86 (diff)
parent 1525 36e912fac70f (current diff)
child 1531 d2b3bbbb1028
Merged skvorl/beremiz into default
--- a/.hgignore	Fri Sep 09 17:57:36 2016 +0300
+++ b/.hgignore	Mon Sep 12 10:15:39 2016 +0500
@@ -2,6 +2,7 @@
 
 syntax: regexp
 ^tests/.*/build$
+^.idea/.*
 syntax: regexp
 ^.*\.pyc$
 syntax: regexp
--- a/controls/LibraryPanel.py	Fri Sep 09 17:57:36 2016 +0300
+++ b/controls/LibraryPanel.py	Mon Sep 12 10:15:39 2016 +0500
@@ -67,8 +67,12 @@
                   self.OnSearchButtonClick, self.SearchCtrl)
         # Bind keyboard event on SearchCtrl text control to catch UP and DOWN
         # for search previous and next occurrence
-        search_textctrl = self.SearchCtrl.GetChildren()[0]
-        search_textctrl.Bind(wx.EVT_CHAR, self.OnKeyDown)
+
+        # This protects from fail to start when no children[0] available (possible for wxPython 3.0)
+        if self.SearchCtrl.GetChildren():
+            search_textctrl = self.SearchCtrl.GetChildren()[0]
+            search_textctrl.Bind(wx.EVT_CHAR, self.OnKeyDown)
+
         main_sizer.AddWindow(self.SearchCtrl, flag=wx.GROW)
         
         # Add Splitter window for tree and block comment to main sizer