--- a/controls/DebugVariablePanel/DebugVariablePanel.py Thu Feb 14 09:44:19 2019 +0300
+++ b/controls/DebugVariablePanel/DebugVariablePanel.py Thu Feb 14 10:02:58 2019 +0300
@@ -521,6 +521,15 @@
self.RefreshGraphicsWindowScrollbars()
def RefreshView(self):
+ """Triggers EVT_PAINT event to refresh UI"""
+ self.Refresh()
+
+ def DrawView(self):
+ """
+ Redraw elements.
+ Method is used by EVT_PAINT handler.
+ """
+
self.RefreshCanvasPosition()
if not self.Fixed or self.Force:
@@ -922,7 +931,9 @@
pass
def OnGraphicsWindowPaint(self, event):
- self.RefreshView()
+ """EVT_PAINT handler"""
+
+ self.DrawView()
event.Skip()
def OnGraphicsWindowResize(self, event):
--- a/controls/DebugVariablePanel/DebugVariableTextViewer.py Thu Feb 14 09:44:19 2019 +0300
+++ b/controls/DebugVariablePanel/DebugVariableTextViewer.py Thu Feb 14 10:02:58 2019 +0300
@@ -185,8 +185,12 @@
self.Buttons.append(GraphButton(0, 0, bitmap, callback))
def RefreshViewer(self):
- """
- Method that refresh the content displayed by Viewer
+ """Triggers EVT_PAINT event to refresh UI"""
+ self.Refresh()
+
+ def DrawViewer(self):
+ """
+ Redraw content displayed by Viewer
"""
# Create buffered DC for drawing in panel
width, height = self.GetSize()
@@ -282,5 +286,5 @@
Function called when redrawing Viewer content is needed
@param event: wx.PaintEvent
"""
- self.RefreshViewer()
+ self.DrawViewer()
event.Skip()
--- a/dialogs/BlockPreviewDialog.py Thu Feb 14 09:44:19 2019 +0300
+++ b/dialogs/BlockPreviewDialog.py Thu Feb 14 10:02:58 2019 +0300
@@ -251,6 +251,10 @@
self.EndModal(wx.ID_OK)
def RefreshPreview(self):
+ """Triggers EVT_PAINT event to refresh UI"""
+ self.Refresh()
+
+ def DrawPreview(self):
"""
Refresh preview panel of graphic element
May be overridden by inherited classes
@@ -300,5 +304,5 @@
Called when Preview panel need to be redraw
@param event: wx.PaintEvent
"""
- self.RefreshPreview()
+ self.DrawPreview()
event.Skip()