From c84562543371b5d289b9900d5419993453600dad Mon Sep 17 00:00:00 2001 From: Steve Jackson Date: Sat, 20 Jul 2019 11:47:46 -0700 Subject: [PATCH] Fix split ratio in screenshots --- src/athena/viewer.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/athena/viewer.py b/src/athena/viewer.py index ef00eb3..26eb6f2 100644 --- a/src/athena/viewer.py +++ b/src/athena/viewer.py @@ -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 ) @@ -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)