diff -r c89fc366bebd -r 0ffb41625592 controls/DebugVariablePanel/DebugVariableTextViewer.py --- a/controls/DebugVariablePanel/DebugVariableTextViewer.py Thu Sep 02 21:36:29 2021 +0200 +++ b/controls/DebugVariablePanel/DebugVariableTextViewer.py Thu Sep 02 22:18:14 2021 +0200 @@ -195,7 +195,7 @@ # Create buffered DC for drawing in panel width, height = self.GetSize() - bitmap = wx.EmptyBitmap(width, height) + bitmap = wx.Bitmap(width, height) dc = wx.BufferedDC(wx.PaintDC(self), bitmap) dc.Clear() @@ -203,8 +203,6 @@ # rendering gc = wx.GCDC(dc) - gc.BeginDrawing() - # Get first item item = self.ItemsDict.values()[0] @@ -232,8 +230,6 @@ # Draw other Viewer common elements self.DrawCommonElements(gc) - gc.EndDrawing() - def OnLeftDown(self, event): """ Function called when mouse left button is pressed @@ -252,7 +248,7 @@ # start a move drag'n drop of item variable x, y = event.GetPosition() item_path_bbox = wx.Rect(20, (height - h) / 2, w, h) - if item_path_bbox.InsideXY(x, y): + if item_path_bbox.Contains(x, y): self.ShowButtons(False) data = wx.TextDataObject(str((item.GetVariable(), "debug", "move"))) dragSource = wx.DropSource(self)