# HG changeset patch
# User Andrey Skvortsov <andrej.skvortzov@gmail.com>
# Date 1533035861 -10800
# Node ID eb6b68c4439fbeaed70f318b3cf9389107ccedd4
# Parent  5927710b56102e2ff8555160c55e87c83c8b207b
Fix flickering in debug panel

This flickering made debug panel unusable, because most of the time
panel was white. This problem effects wxPython with GTK3+ backend
(at least on GNU/Linux systems).

Removed code IIUC draws box with content of moved debug variable, I
don't see any effect of it neither on GNU/Linux nor on Windows. It
should be safe to remove.

diff -r 5927710b5610 -r eb6b68c4439f controls/DebugVariablePanel/DebugVariablePanel.py
--- a/controls/DebugVariablePanel/DebugVariablePanel.py	Mon Jul 30 19:28:39 2018 +0300
+++ b/controls/DebugVariablePanel/DebugVariablePanel.py	Tue Jul 31 14:17:41 2018 +0300
@@ -35,8 +35,6 @@
 import matplotlib
 matplotlib.use('WX')   # noqa
 import matplotlib.pyplot
-from matplotlib.backends.backend_wxagg import _convert_agg_to_wx_bitmap
-
 
 from editors.DebugViewer import DebugViewer
 from util.BitmapLibrary import GetBitmap
@@ -525,24 +523,6 @@
     def RefreshView(self):
         self.RefreshCanvasPosition()
 
-        width, height = self.GraphicsWindow.GetVirtualSize()
-        bitmap = wx.EmptyBitmap(width, height)
-        dc = wx.BufferedDC(wx.ClientDC(self.GraphicsWindow), bitmap)
-        dc.Clear()
-        dc.BeginDrawing()
-        if self.DraggingAxesPanel is not None:
-            destBBox = self.DraggingAxesBoundingBox
-            srcBBox = self.DraggingAxesPanel.GetAxesBoundingBox()
-
-            srcBmp = _convert_agg_to_wx_bitmap(self.DraggingAxesPanel.get_renderer(), None)
-            srcDC = wx.MemoryDC()
-            srcDC.SelectObject(srcBmp)
-
-            dc.Blit(destBBox.x, destBBox.y,
-                    int(destBBox.width), int(destBBox.height),
-                    srcDC, srcBBox.x, srcBBox.y)
-        dc.EndDrawing()
-
         if not self.Fixed or self.Force:
             self.Force = False
             refresh_graphics = True