]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/wx/lib/editor/editor.py
removed some members from wxAuiPaneInfo which should not be on the class interface
[wxWidgets.git] / wxPython / wx / lib / editor / editor.py
index 351e5f3d89b4ca53971c3f103d94a0209f1f8dda..2a3f3af6ba27df866a8e2e5b4fb8faba0fdd78dc 100644 (file)
@@ -241,9 +241,8 @@ class Editor(wx.ScrolledWindow):
         if not odc:
             odc = wx.ClientDC(self)
 
-        bmp = wx.EmptyBitmap(max(1,self.bw), max(1,self.bh))
-        dc = wx.BufferedDC(odc, bmp)
-        if dc.Ok():
+        dc = wx.BufferedDC(odc)
+        if dc.IsOk():
             dc.SetFont(self.font)
             dc.SetBackgroundMode(wx.SOLID)
             dc.SetTextBackground(self.bgColor)
@@ -552,12 +551,13 @@ class Editor(wx.ScrolledWindow):
 
 
     def AdjustScrollbars(self):
-        for i in range(2):
-            self.SetCharDimensions()
-            self.scroller.SetScrollbars(
-                self.fw, self.fh,
-                self.CalcMaxLineLen()+3, max(self.LinesInFile()+1, self.sh),
-                self.sx, self.sy)
+        if self:
+            for i in range(2):
+                self.SetCharDimensions()
+                self.scroller.SetScrollbars(
+                    self.fw, self.fh,
+                    self.CalcMaxLineLen()+3, max(self.LinesInFile()+1, self.sh),
+                    self.sx, self.sy)
 
 #------------ backspace, delete, return
 
@@ -941,7 +941,7 @@ class Editor(wx.ScrolledWindow):
         self.AdjustScrollbars()
 
     def OnChar(self, event):
-        key = event.KeyCode()
+        key = event.GetKeyCode()
         filters = [self.AltKey,
                    self.MoveSpecialControlKey,
                    self.ControlKey,