New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x.interact() fails in vcs (None object) #634

Closed
doutriaux1 opened this Issue Sep 11, 2014 · 3 comments

Comments

Projects
None yet
2 participants
@doutriaux1
Member

doutriaux1 commented Sep 11, 2014

@ThomasMaxwell I think we step on each other code about this one, I'll post my "solution" here and you tell me if it affects you ok?

Thanks.

@doutriaux1 doutriaux1 self-assigned this Sep 11, 2014

@doutriaux1 doutriaux1 added this to the 2.0.0 milestone Sep 11, 2014

@ThomasMaxwell

This comment has been minimized.

Contributor

ThomasMaxwell commented Sep 11, 2014

Sounds good.

From: Charles <notifications@github.commailto:notifications@github.com>
Reply-To: UV-CDAT/uvcdat <reply@reply.github.commailto:reply@reply.github.com>
Date: Thursday, September 11, 2014 1:11 PM
To: UV-CDAT/uvcdat <uvcdat@noreply.github.commailto:uvcdat@noreply.github.com>
Cc: "Maxwell, Thomas P. (GSFC-606.2)[SCIENCE APPLICATIONS INTL CORP]" <thomas.maxwell@nasa.govmailto:thomas.maxwell@nasa.gov>
Subject: [uvcdat] x.interact() fails in vcs (None object) (#634)

@ThomasMaxwellhttps://github.com/ThomasMaxwell I think we step on each other code about this one, I'll post my "solution" here and you tell me if it affects you ok?

Thanks.


Reply to this email directly or view it on GitHubhttps://github.com//issues/634.

@doutriaux1

This comment has been minimized.

Member

doutriaux1 commented Sep 11, 2014

@ThomasMaxwell do you think the following will mess you up?

diff --git a/Packages/vcs/Lib/VTKPlots.py b/Packages/vcs/Lib/VTKPlots.py
index 58c2580..f2e1ec0 100644
--- a/Packages/vcs/Lib/VTKPlots.py
+++ b/Packages/vcs/Lib/VTKPlots.py
@@ -300,14 +300,14 @@ class VTKVCSBackend(object):

   def plot(self,data1,data2,template,gtype,gname,bg,*args,**kargs):
     self.numberOfPlotCalls+=1
-    created = self.createRenWin(**kargs)
     if self.bg is None:
       if bg:
         self.bg= True
       else:
         self.bg= False
-        if created:
-          self.initialSize()
+    created = self.createRenWin(**kargs)
+    if created:
+      self.initialSize()
     if self.bg:
         self.renWin.SetOffScreenRendering(True)
         self.renWin.SetSize(self.canvas.bgX,self.canvas.bgY)

it is in branch issue_634_xinteract please review and let @aashish24 if he can merge back in

@ThomasMaxwell

This comment has been minimized.

Contributor

ThomasMaxwell commented Sep 11, 2014

Just ran some tests and this looks fine to me.

Thanks!

From: Charles <notifications@github.commailto:notifications@github.com>
Reply-To: UV-CDAT/uvcdat <reply@reply.github.commailto:reply@reply.github.com>
Date: Thursday, September 11, 2014 1:43 PM
To: UV-CDAT/uvcdat <uvcdat@noreply.github.commailto:uvcdat@noreply.github.com>
Cc: "Maxwell, Thomas P. (GSFC-606.2)[SCIENCE APPLICATIONS INTL CORP]" <thomas.maxwell@nasa.govmailto:thomas.maxwell@nasa.gov>
Subject: Re: [uvcdat] x.interact() fails in vcs (None object) (#634)

@ThomasMaxwellhttps://github.com/ThomasMaxwell do you think the following will mess you up?

diff --git a/Packages/vcs/Lib/VTKPlots.py b/Packages/vcs/Lib/VTKPlots.py
index 58c2580..f2e1ec0 100644
--- a/Packages/vcs/Lib/VTKPlots.py
+++ b/Packages/vcs/Lib/VTKPlots.py
@@ -300,14 +300,14 @@ class VTKVCSBackend(object):

def plot(self,data1,data2,template,gtype,gname,bg,args,*kargs):
self.numberOfPlotCalls+=1

  • created = self.createRenWin(**kargs)
    if self.bg is None:
    if bg:
    self.bg= True
    else:
    self.bg= False
  •    if created:
    
  •      self.initialSize()
    
  • created = self.createRenWin(**kargs)
  • if created:
  •  self.initialSize()
    
    if self.bg:
    self.renWin.SetOffScreenRendering(True)
    self.renWin.SetSize(self.canvas.bgX,self.canvas.bgY)

it is in branch issue_634_xinteract please review and let @aashish24https://github.com/aashish24 if he can merge back in


Reply to this email directly or view it on GitHubhttps://github.com//issues/634#issuecomment-55300724.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment