Skip to content

Commit

Permalink
Fix split ratio in screenshots
Browse files Browse the repository at this point in the history
  • Loading branch information
sjackso committed Jul 20, 2019
1 parent d7c9d35 commit c845625
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/athena/viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def reset(self):
def _extents(self, ratio=None):
# Return the visible x,y dimensions
if ratio is None: ratio = self._windowAspectRatio()
elif self.split: ratio /= 2
mesh_extents = self.aabb.max - self.aabb.min
view_extents = mesh_extents * self.margin
view_extents.setX( view_extents.y() * ratio )
Expand Down Expand Up @@ -153,6 +154,7 @@ def clamp(min_, max_, value):

def resize(self, ratio = None):
if ratio is None: ratio = self._windowAspectRatio()
elif self.split: ratio /= 2
self.camera.setAspectRatio(ratio)


Expand Down

0 comments on commit c845625

Please sign in to comment.