{"action":"created","comment":{"url":"https://api.github.com/repos/enthought/mayavi/pulls/comments/60586855","id":60586855,"diff_hunk":"@@ -571,6 +571,10 @@ def OnButtonUp(self, event):\n     def _closed_fired(self):\n         super(Scene, self)._closed_fired()\n         self.picker = None\n+        # Remove OnPaint handler for PaintEvent, otherwise\n+        # OnPaint tries to reset the size of the nonexisting\n+        # renderwindow\n+        wx.EVT_PAINT(self._vtk_control, None)","path":"tvtk/pyface/ui/wx/scene.py","position":7,"original_position":7,"commit_id":"f7c6e46a5180872a7682a98512daf96435853e1d","original_commit_id":"f7c6e46a5180872a7682a98512daf96435853e1d","user":{"login":"stefanoborini","id":132967,"avatar_url":"https://avatars.githubusercontent.com/u/132967?v=3","gravatar_id":"","url":"https://api.github.com/users/stefanoborini","html_url":"https://github.com/stefanoborini","followers_url":"https://api.github.com/users/stefanoborini/followers","following_url":"https://api.github.com/users/stefanoborini/following{/other_user}","gists_url":"https://api.github.com/users/stefanoborini/gists{/gist_id}","starred_url":"https://api.github.com/users/stefanoborini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefanoborini/subscriptions","organizations_url":"https://api.github.com/users/stefanoborini/orgs","repos_url":"https://api.github.com/users/stefanoborini/repos","events_url":"https://api.github.com/users/stefanoborini/events{/privacy}","received_events_url":"https://api.github.com/users/stefanoborini/received_events","type":"User","site_admin":false},"body":"Good. Merging.\r\n","created_at":"2016-04-21T14:12:05Z","updated_at":"2016-04-21T14:12:05Z","html_url":"https://github.com/enthought/mayavi/pull/331#discussion_r60586855","pull_request_url":"https://api.github.com/repos/enthought/mayavi/pulls/331","_links":{"self":{"href":"https://api.github.com/repos/enthought/mayavi/pulls/comments/60586855"},"html":{"href":"https://github.com/enthought/mayavi/pull/331#discussion_r60586855"},"pull_request":{"href":"https://api.github.com/repos/enthought/mayavi/pulls/331"}}},"pull_request":{"url":"https://api.github.com/repos/enthought/mayavi/pulls/331","id":64818435,"html_url":"https://github.com/enthought/mayavi/pull/331","diff_url":"https://github.com/enthought/mayavi/pull/331.diff","patch_url":"https://github.com/enthought/mayavi/pull/331.patch","issue_url":"https://api.github.com/repos/enthought/mayavi/issues/331","number":331,"state":"open","locked":false,"title":"Fix savefig size and black image","user":{"login":"kitchoi","id":3673984,"avatar_url":"https://avatars.githubusercontent.com/u/3673984?v=3","gravatar_id":"","url":"https://api.github.com/users/kitchoi","html_url":"https://github.com/kitchoi","followers_url":"https://api.github.com/users/kitchoi/followers","following_url":"https://api.github.com/users/kitchoi/following{/other_user}","gists_url":"https://api.github.com/users/kitchoi/gists{/gist_id}","starred_url":"https://api.github.com/users/kitchoi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kitchoi/subscriptions","organizations_url":"https://api.github.com/users/kitchoi/orgs","repos_url":"https://api.github.com/users/kitchoi/repos","events_url":"https://api.github.com/users/kitchoi/events{/privacy}","received_events_url":"https://api.github.com/users/kitchoi/received_events","type":"User","site_admin":false},"body":"Fix https://github.com/simphony/simphony-mayavi/issues/52, fix #257, potentially related to #75\r\n\r\nSupersede #316 and #317 (the two issues are highly related that it has become impossible to separate the two)\r\n\r\nUpon saving an image (snapshot), a new tvtkRenderWindow is created.  This is motivated by the fact that under Mac OS, vtkCocoaRenderWindow is the render window being used and if the vtkRenderWindow is contained by an interactor, resizing the renderwindow leads to the resulting image to be rendered only within the initial size.  Therefore a new tvtkRenderWindow is needed for saving an image in Mac.\r\n\r\nThis fix for Mac causes a side effect for Linux which is that when offscreen is off, saving an image will create a new window.  Forcing offscreen to true for the dummy tvtkRenderWindow would enhance the user experience but render the savefig function completely unusable if the machine does not support offscreen.\r\n\r\n\r\nTested platforms:\r\nMac OS 10.11 + wxPython/PyQt + VTK 6.2\r\nUbuntu 12.02 LTS + VTK 5.10/6.2.0/6.3.0 + wxPython/PyQt\r\n","created_at":"2016-03-31T16:22:01Z","updated_at":"2016-04-21T14:12:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"54d1c622811b7ab90cd89eb854a2a15d22f79d1d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/enthought/mayavi/pulls/331/commits","review_comments_url":"https://api.github.com/repos/enthought/mayavi/pulls/331/comments","review_comment_url":"https://api.github.com/repos/enthought/mayavi/pulls/comments{/number}","comments_url":"https://api.github.com/repos/enthought/mayavi/issues/331/comments","statuses_url":"https://api.github.com/repos/enthought/mayavi/statuses/f7c6e46a5180872a7682a98512daf96435853e1d","head":{"label":"enthought:fix-savefig-size-black-image","ref":"fix-savefig-size-black-image","sha":"f7c6e46a5180872a7682a98512daf96435853e1d","user":{"login":"enthought","id":539651,"avatar_url":"https://avatars.githubusercontent.com/u/539651?v=3","gravatar_id":"","url":"https://api.github.com/users/enthought","html_url":"https://github.com/enthought","followers_url":"https://api.github.com/users/enthought/followers","following_url":"https://api.github.com/users/enthought/following{/other_user}","gists_url":"https://api.github.com/users/enthought/gists{/gist_id}","starred_url":"https://api.github.com/users/enthought/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enthought/subscriptions","organizations_url":"https://api.github.com/users/enthought/orgs","repos_url":"https://api.github.com/users/enthought/repos","events_url":"https://api.github.com/users/enthought/events{/privacy}","received_events_url":"https://api.github.com/users/enthought/received_events","type":"Organization","site_admin":false},"repo":{"id":1288547,"name":"mayavi","full_name":"enthought/mayavi","owner":{"login":"enthought","id":539651,"avatar_url":"https://avatars.githubusercontent.com/u/539651?v=3","gravatar_id":"","url":"https://api.github.com/users/enthought","html_url":"https://github.com/enthought","followers_url":"https://api.github.com/users/enthought/followers","following_url":"https://api.github.com/users/enthought/following{/other_user}","gists_url":"https://api.github.com/users/enthought/gists{/gist_id}","starred_url":"https://api.github.com/users/enthought/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enthought/subscriptions","organizations_url":"https://api.github.com/users/enthought/orgs","repos_url":"https://api.github.com/users/enthought/repos","events_url":"https://api.github.com/users/enthought/events{/privacy}","received_events_url":"https://api.github.com/users/enthought/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/enthought/mayavi","description":"3D visualization of scientific data in Python","fork":false,"url":"https://api.github.com/repos/enthought/mayavi","forks_url":"https://api.github.com/repos/enthought/mayavi/forks","keys_url":"https://api.github.com/repos/enthought/mayavi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/enthought/mayavi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/enthought/mayavi/teams","hooks_url":"https://api.github.com/repos/enthought/mayavi/hooks","issue_events_url":"https://api.github.com/repos/enthought/mayavi/issues/events{/number}","events_url":"https://api.github.com/repos/enthought/mayavi/events","assignees_url":"https://api.github.com/repos/enthought/mayavi/assignees{/user}","branches_url":"https://api.github.com/repos/enthought/mayavi/branches{/branch}","tags_url":"https://api.github.com/repos/enthought/mayavi/tags","blobs_url":"https://api.github.com/repos/enthought/mayavi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/enthought/mayavi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/enthought/mayavi/git/refs{/sha}","trees_url":"https://api.github.com/repos/enthought/mayavi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/enthought/mayavi/statuses/{sha}","languages_url":"https://api.github.com/repos/enthought/mayavi/languages","stargazers_url":"https://api.github.com/repos/enthought/mayavi/stargazers","contributors_url":"https://api.github.com/repos/enthought/mayavi/contributors","subscribers_url":"https://api.github.com/repos/enthought/mayavi/subscribers","subscription_url":"https://api.github.com/repos/enthought/mayavi/subscription","commits_url":"https://api.github.com/repos/enthought/mayavi/commits{/sha}","git_commits_url":"https://api.github.com/repos/enthought/mayavi/git/commits{/sha}","comments_url":"https://api.github.com/repos/enthought/mayavi/comments{/number}","issue_comment_url":"https://api.github.com/repos/enthought/mayavi/issues/comments{/number}","contents_url":"https://api.github.com/repos/enthought/mayavi/contents/{+path}","compare_url":"https://api.github.com/repos/enthought/mayavi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/enthought/mayavi/merges","archive_url":"https://api.github.com/repos/enthought/mayavi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/enthought/mayavi/downloads","issues_url":"https://api.github.com/repos/enthought/mayavi/issues{/number}","pulls_url":"https://api.github.com/repos/enthought/mayavi/pulls{/number}","milestones_url":"https://api.github.com/repos/enthought/mayavi/milestones{/number}","notifications_url":"https://api.github.com/repos/enthought/mayavi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/enthought/mayavi/labels{/name}","releases_url":"https://api.github.com/repos/enthought/mayavi/releases{/id}","deployments_url":"https://api.github.com/repos/enthought/mayavi/deployments","created_at":"2011-01-24T17:48:00Z","updated_at":"2016-04-19T12:22:52Z","pushed_at":"2016-04-21T13:31:48Z","git_url":"git://github.com/enthought/mayavi.git","ssh_url":"git@github.com:enthought/mayavi.git","clone_url":"https://github.com/enthought/mayavi.git","svn_url":"https://github.com/enthought/mayavi","homepage":"http://docs.enthought.com/mayavi/mayavi/","size":80125,"stargazers_count":241,"watchers_count":241,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":92,"mirror_url":null,"open_issues_count":108,"forks":92,"open_issues":108,"watchers":241,"default_branch":"master"}},"base":{"label":"enthought:master","ref":"master","sha":"89fc64d55bbdad7cead0f721e4aed820352d2c00","user":{"login":"enthought","id":539651,"avatar_url":"https://avatars.githubusercontent.com/u/539651?v=3","gravatar_id":"","url":"https://api.github.com/users/enthought","html_url":"https://github.com/enthought","followers_url":"https://api.github.com/users/enthought/followers","following_url":"https://api.github.com/users/enthought/following{/other_user}","gists_url":"https://api.github.com/users/enthought/gists{/gist_id}","starred_url":"https://api.github.com/users/enthought/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enthought/subscriptions","organizations_url":"https://api.github.com/users/enthought/orgs","repos_url":"https://api.github.com/users/enthought/repos","events_url":"https://api.github.com/users/enthought/events{/privacy}","received_events_url":"https://api.github.com/users/enthought/received_events","type":"Organization","site_admin":false},"repo":{"id":1288547,"name":"mayavi","full_name":"enthought/mayavi","owner":{"login":"enthought","id":539651,"avatar_url":"https://avatars.githubusercontent.com/u/539651?v=3","gravatar_id":"","url":"https://api.github.com/users/enthought","html_url":"https://github.com/enthought","followers_url":"https://api.github.com/users/enthought/followers","following_url":"https://api.github.com/users/enthought/following{/other_user}","gists_url":"https://api.github.com/users/enthought/gists{/gist_id}","starred_url":"https://api.github.com/users/enthought/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enthought/subscriptions","organizations_url":"https://api.github.com/users/enthought/orgs","repos_url":"https://api.github.com/users/enthought/repos","events_url":"https://api.github.com/users/enthought/events{/privacy}","received_events_url":"https://api.github.com/users/enthought/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/enthought/mayavi","description":"3D visualization of scientific data in Python","fork":false,"url":"https://api.github.com/repos/enthought/mayavi","forks_url":"https://api.github.com/repos/enthought/mayavi/forks","keys_url":"https://api.github.com/repos/enthought/mayavi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/enthought/mayavi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/enthought/mayavi/teams","hooks_url":"https://api.github.com/repos/enthought/mayavi/hooks","issue_events_url":"https://api.github.com/repos/enthought/mayavi/issues/events{/number}","events_url":"https://api.github.com/repos/enthought/mayavi/events","assignees_url":"https://api.github.com/repos/enthought/mayavi/assignees{/user}","branches_url":"https://api.github.com/repos/enthought/mayavi/branches{/branch}","tags_url":"https://api.github.com/repos/enthought/mayavi/tags","blobs_url":"https://api.github.com/repos/enthought/mayavi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/enthought/mayavi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/enthought/mayavi/git/refs{/sha}","trees_url":"https://api.github.com/repos/enthought/mayavi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/enthought/mayavi/statuses/{sha}","languages_url":"https://api.github.com/repos/enthought/mayavi/languages","stargazers_url":"https://api.github.com/repos/enthought/mayavi/stargazers","contributors_url":"https://api.github.com/repos/enthought/mayavi/contributors","subscribers_url":"https://api.github.com/repos/enthought/mayavi/subscribers","subscription_url":"https://api.github.com/repos/enthought/mayavi/subscription","commits_url":"https://api.github.com/repos/enthought/mayavi/commits{/sha}","git_commits_url":"https://api.github.com/repos/enthought/mayavi/git/commits{/sha}","comments_url":"https://api.github.com/repos/enthought/mayavi/comments{/number}","issue_comment_url":"https://api.github.com/repos/enthought/mayavi/issues/comments{/number}","contents_url":"https://api.github.com/repos/enthought/mayavi/contents/{+path}","compare_url":"https://api.github.com/repos/enthought/mayavi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/enthought/mayavi/merges","archive_url":"https://api.github.com/repos/enthought/mayavi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/enthought/mayavi/downloads","issues_url":"https://api.github.com/repos/enthought/mayavi/issues{/number}","pulls_url":"https://api.github.com/repos/enthought/mayavi/pulls{/number}","milestones_url":"https://api.github.com/repos/enthought/mayavi/milestones{/number}","notifications_url":"https://api.github.com/repos/enthought/mayavi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/enthought/mayavi/labels{/name}","releases_url":"https://api.github.com/repos/enthought/mayavi/releases{/id}","deployments_url":"https://api.github.com/repos/enthought/mayavi/deployments","created_at":"2011-01-24T17:48:00Z","updated_at":"2016-04-19T12:22:52Z","pushed_at":"2016-04-21T13:31:48Z","git_url":"git://github.com/enthought/mayavi.git","ssh_url":"git@github.com:enthought/mayavi.git","clone_url":"https://github.com/enthought/mayavi.git","svn_url":"https://github.com/enthought/mayavi","homepage":"http://docs.enthought.com/mayavi/mayavi/","size":80125,"stargazers_count":241,"watchers_count":241,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":92,"mirror_url":null,"open_issues_count":108,"forks":92,"open_issues":108,"watchers":241,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/enthought/mayavi/pulls/331"},"html":{"href":"https://github.com/enthought/mayavi/pull/331"},"issue":{"href":"https://api.github.com/repos/enthought/mayavi/issues/331"},"comments":{"href":"https://api.github.com/repos/enthought/mayavi/issues/331/comments"},"review_comments":{"href":"https://api.github.com/repos/enthought/mayavi/pulls/331/comments"},"review_comment":{"href":"https://api.github.com/repos/enthought/mayavi/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/enthought/mayavi/pulls/331/commits"},"statuses":{"href":"https://api.github.com/repos/enthought/mayavi/statuses/f7c6e46a5180872a7682a98512daf96435853e1d"}}}}