From 841c293ca3d20b8af72fc24356d42c5211201567 Mon Sep 17 00:00:00 2001
From: Paul McCarthy <pauld.mccarthy@gmail.com>
Date: Thu, 16 Jul 2015 14:12:39 +0100
Subject: [PATCH] Cosmetic changes to Profile subclasses which should have been
 included two commits ago

---
 fsl/fslview/profiles/lightboxviewprofile.py |  8 ++++----
 fsl/fslview/profiles/orthoeditprofile.py    | 12 ++++++------
 fsl/fslview/profiles/orthoviewprofile.py    | 14 +++++++-------
 3 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/fsl/fslview/profiles/lightboxviewprofile.py b/fsl/fslview/profiles/lightboxviewprofile.py
index 7ac7ad5eb..1d8e3b298 100644
--- a/fsl/fslview/profiles/lightboxviewprofile.py
+++ b/fsl/fslview/profiles/lightboxviewprofile.py
@@ -14,9 +14,9 @@ import fsl.fslview.profiles as profiles
 
 
 class LightBoxViewProfile(profiles.Profile):
-    def __init__(self, canvasPanel, overlayList, displayCtx):
+    def __init__(self, viewPanel, overlayList, displayCtx):
         profiles.Profile.__init__(self,
-                                  canvasPanel,
+                                  viewPanel,
                                   overlayList,
                                   displayCtx,
                                   modes=['view', 'zoom'])
@@ -41,7 +41,7 @@ class LightBoxViewProfile(profiles.Profile):
         if   wheel > 0: wheel = -1
         elif wheel < 0: wheel =  1
 
-        self._canvasPanel.getCanvas().topRow += wheel
+        self._viewPanel.getCanvas().topRow += wheel
 
         
     def _viewModeLeftMouseDrag(self, ev, canvas, mousePos, canvasPos):
@@ -69,4 +69,4 @@ class LightBoxViewProfile(profiles.Profile):
 
         if   wheel > 0: wheel =  50
         elif wheel < 0: wheel = -50
-        self._canvasPanel.getSceneOptions().zoom += wheel 
+        self._viewPanel.getSceneOptions().zoom += wheel 
diff --git a/fsl/fslview/profiles/orthoeditprofile.py b/fsl/fslview/profiles/orthoeditprofile.py
index c616b014c..d8967216d 100644
--- a/fsl/fslview/profiles/orthoeditprofile.py
+++ b/fsl/fslview/profiles/orthoeditprofile.py
@@ -72,12 +72,12 @@ class OrthoEditProfile(orthoviewprofile.OrthoViewProfile):
         self._selAnnotation.texture.refresh() 
  
 
-    def __init__(self, canvasPanel, overlayList, displayCtx):
+    def __init__(self, viewPanel, overlayList, displayCtx):
 
         self._editor         = editor.Editor(overlayList, displayCtx) 
-        self._xcanvas        = canvasPanel.getXCanvas()
-        self._ycanvas        = canvasPanel.getYCanvas()
-        self._zcanvas        = canvasPanel.getZCanvas() 
+        self._xcanvas        = viewPanel.getXCanvas()
+        self._ycanvas        = viewPanel.getYCanvas()
+        self._zcanvas        = viewPanel.getZCanvas() 
         self._selAnnotation  = None
         self._selecting      = False
         self._lastDist       = None
@@ -93,7 +93,7 @@ class OrthoEditProfile(orthoviewprofile.OrthoViewProfile):
 
         orthoviewprofile.OrthoViewProfile.__init__(
             self,
-            canvasPanel,
+            viewPanel,
             overlayList,
             displayCtx,
             ['sel', 'desel', 'selint'],
@@ -194,7 +194,7 @@ class OrthoEditProfile(orthoviewprofile.OrthoViewProfile):
         xannot.obj(self._selAnnotation,  hold=True)
         yannot.obj(self._selAnnotation,  hold=True)
         zannot.obj(self._selAnnotation,  hold=True)
-        self._canvasPanel.Refresh()
+        self._viewPanel.Refresh()
 
 
     def _selectionChanged(self, *a):
diff --git a/fsl/fslview/profiles/orthoviewprofile.py b/fsl/fslview/profiles/orthoviewprofile.py
index 24eacf675..5c54b5250 100644
--- a/fsl/fslview/profiles/orthoviewprofile.py
+++ b/fsl/fslview/profiles/orthoviewprofile.py
@@ -38,13 +38,13 @@ class OrthoViewProfile(profiles.Profile):
 
 
     def __init__(self,
-                 canvasPanel,
+                 viewPanel,
                  overlayList,
                  displayCtx,
                  extraModes=None,
                  extraActions=None):
         """Creates an :class:`OrthoViewProfile`, which can be registered
-        with the given ``canvasPanel`` which is assumed to be an
+        with the given ``viewPanel`` which is assumed to be an
         :class:`.OrthoPanel` instance.
         """
 
@@ -61,15 +61,15 @@ class OrthoViewProfile(profiles.Profile):
         actionz = dict(actionz.items() + extraActions.items())
 
         profiles.Profile.__init__(self,
-                                  canvasPanel,
+                                  viewPanel,
                                   overlayList,
                                   displayCtx,
                                   modes,
                                   actionz)
 
-        self._xcanvas = canvasPanel.getXCanvas()
-        self._ycanvas = canvasPanel.getYCanvas()
-        self._zcanvas = canvasPanel.getZCanvas()
+        self._xcanvas = viewPanel.getXCanvas()
+        self._ycanvas = viewPanel.getYCanvas()
+        self._zcanvas = viewPanel.getZCanvas()
 
         # This attribute will occasionally store a
         # reference to a gl.annotations.Rectangle -
@@ -85,7 +85,7 @@ class OrthoViewProfile(profiles.Profile):
 
     def resetZoom(self, *a):
 
-        opts = self._canvasPanel.getSceneOptions()
+        opts = self._viewPanel.getSceneOptions()
 
         opts.zoom  = 100
         opts.xzoom = 100
-- 
GitLab