diff options
author | volconst <20997907+volconst@users.noreply.github.com> | 2022-05-08 22:05:53 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-08 22:05:53 +0300 |
commit | 60d541e0519802e5ebb3c6e3b1db242bf91c2108 (patch) | |
tree | 64cf3d8ddbffa926641aa90e77c39d3822eb485d | |
parent | ee5702bf4742f69ca537722be79f300b9dfe5be7 (diff) | |
parent | cec59f06583c0b1ed9d2ebd959cc2f54e84234f9 (diff) |
Merge pull request #1259 from volconst/perspective-zoomed-width
Fix missing zoomed_width in perspective mode
-rw-r--r-- | printrun/gl/panel.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/printrun/gl/panel.py b/printrun/gl/panel.py index e1b1013..0253599 100644 --- a/printrun/gl/panel.py +++ b/printrun/gl/panel.py @@ -268,14 +268,14 @@ class wxGLPanel(BASE_CLASS): glMatrixMode(GL_MODELVIEW) glLoadIdentity() self.setup_lights() - if self.orthographic: - wratio = self.width / self.dist - hratio = self.height / self.dist - minratio = float(min(wratio, hratio)) - self.zoom_factor = 1.0 - self.zoomed_width = wratio / minratio - self.zoomed_height = hratio / minratio - glScalef(factor * minratio, factor * minratio, 1) + + wratio = self.width / self.dist + hratio = self.height / self.dist + minratio = float(min(wratio, hratio)) + self.zoom_factor = 1.0 + self.zoomed_width = wratio / minratio + self.zoomed_height = hratio / minratio + glScalef(factor * minratio, factor * minratio, 1) def DrawCanvas(self): """Draw the window.""" |