[Yt-svn] yt-commit r517 - trunk/yt/reason

mturk at wrangler.dreamhost.com mturk at wrangler.dreamhost.com
Mon Jun 2 17:13:24 PDT 2008


Author: mturk
Date: Mon Jun  2 17:13:24 2008
New Revision: 517
URL: http://yt.spacepope.org/changeset/517

Log:
A fix to get the re-centering working.  Evidently I multiply defined a method
which should have only been defined for slices, etc etc.



Modified:
   trunk/yt/reason/Notebook.py

Modified: trunk/yt/reason/Notebook.py
==============================================================================
--- trunk/yt/reason/Notebook.py	(original)
+++ trunk/yt/reason/Notebook.py	Mon Jun  2 17:13:24 2008
@@ -492,16 +492,6 @@
         self.ChangeCenter(x,y)
         self.UpdateWidth()
 
-    def ChangeCenterFromMessage(self, message):
-        x, y, z = message.data
-        # We are dealing with a pass-by-reference center
-        self.center[0] = x
-        self.center[1] = y
-        self.center[2] = z
-        self.data.reslice(self.center[self.axis])
-        # If we do this, we get 3x as many updates as we want
-        #self.UpdateWidth()
-
     def ConvertPositionToDataPosition(self, xp, yp):
         #if not self.figure.axes[0].in_axes(xp,yp): return None, None
         #xp, yp = self.figure.axes[0].transData.inverse_xy_tup((xp,yp))
@@ -683,6 +673,11 @@
                                     self.center[self.axis], self.field, self.center)
         self.plot = be.SlicePlot(self.data, self.field, figure=self.figure, axes=self.axes)
 
+    def ChangeCenterFromMessage(self, message):
+        VMPlotPage.ChangeCenterFromMessage(self, message)
+        self.data.reslice(self.center[self.axis])
+
+
 class ProjPlotPage(VMPlotPage):
     def makePlot(self):
         self.data = self.outputfile.hierarchy.proj(self.axis,



More information about the yt-svn mailing list