Skip to content
Snippets Groups Projects
Commit 1e1a3cb2 authored by Paul McCarthy's avatar Paul McCarthy
Browse files

Added underscore to draw/resize methods, as they should never be called externally

parent fe2cd1f8
No related branches found
No related tags found
No related merge requests found
......@@ -267,7 +267,7 @@ class SliceCanvas(wxgl.GLCanvas):
self.glReady = False
# All the work is done by the draw method
self.Bind(wx.EVT_PAINT, self.draw)
self.Bind(wx.EVT_PAINT, self._draw)
# When the image list changes, refresh the
# display, and update the display bounds
......@@ -470,7 +470,7 @@ class SliceCanvas(wxgl.GLCanvas):
return width, height
def resize(self):
def _resize(self):
"""
Sets up the GL canvas size, viewport, and
projection. This method is called by draw(),
......@@ -516,7 +516,7 @@ class SliceCanvas(wxgl.GLCanvas):
gl.glTranslatef(*trans)
def draw(self, ev):
def _draw(self, ev):
"""
Draws the currently selected slice to the canvas.
"""
......@@ -527,7 +527,7 @@ class SliceCanvas(wxgl.GLCanvas):
return
self.context.SetCurrent(self)
self.resize()
self._resize()
# clear the canvas
gl.glClear(gl.GL_COLOR_BUFFER_BIT | gl.GL_DEPTH_BUFFER_BIT)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment