Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kliment/Printrun.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvolconst <20997907+volconst@users.noreply.github.com>2022-05-08 22:05:53 +0300
committerGitHub <noreply@github.com>2022-05-08 22:05:53 +0300
commit60d541e0519802e5ebb3c6e3b1db242bf91c2108 (patch)
tree64cf3d8ddbffa926641aa90e77c39d3822eb485d
parentee5702bf4742f69ca537722be79f300b9dfe5be7 (diff)
parentcec59f06583c0b1ed9d2ebd959cc2f54e84234f9 (diff)
Merge pull request #1259 from volconst/perspective-zoomed-width
Fix missing zoomed_width in perspective mode
-rw-r--r--printrun/gl/panel.py16
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."""