Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
Printrun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
machinery
Printrun
Commits
34f653fd
Commit
34f653fd
authored
May 29, 2013
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make resizing work in wx2.9
parent
f2cab549
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
gcview.py
printrun/gcview.py
+3
-5
No files found.
printrun/gcview.py
View file @
34f653fd
...
@@ -63,13 +63,12 @@ class wxGLPanel(wx.Panel):
...
@@ -63,13 +63,12 @@ class wxGLPanel(wx.Panel):
def
processSizeEvent
(
self
,
event
):
def
processSizeEvent
(
self
,
event
):
'''Process the resize event.'''
'''Process the resize event.'''
if
self
.
canvas
.
GetContext
():
if
(
wx
.
VERSION
>
(
2
,
9
)
and
self
.
canvas
.
IsShownOnScreen
())
or
self
.
canvas
.
GetContext
():
# Make sure the frame is shown before calling SetCurrent.
# Make sure the frame is shown before calling SetCurrent.
self
.
Show
()
size
=
self
.
GetClientSize
()
self
.
canvas
.
SetCurrent
(
self
.
context
)
size
=
self
.
canvas
.
GetClientSize
()
self
.
winsize
=
(
size
.
width
,
size
.
height
)
self
.
winsize
=
(
size
.
width
,
size
.
height
)
self
.
width
,
self
.
height
=
size
.
width
,
size
.
height
self
.
width
,
self
.
height
=
size
.
width
,
size
.
height
self
.
canvas
.
SetCurrent
(
self
.
context
)
self
.
OnReshape
(
size
.
width
,
size
.
height
)
self
.
OnReshape
(
size
.
width
,
size
.
height
)
self
.
canvas
.
Refresh
(
False
)
self
.
canvas
.
Refresh
(
False
)
event
.
Skip
()
event
.
Skip
()
...
@@ -127,7 +126,6 @@ class wxGLPanel(wx.Panel):
...
@@ -127,7 +126,6 @@ class wxGLPanel(wx.Panel):
gluPerspective
(
60.
,
width
/
float
(
height
),
.1
,
1000.
)
gluPerspective
(
60.
,
width
/
float
(
height
),
.1
,
1000.
)
glMatrixMode
(
GL_MODELVIEW
)
glMatrixMode
(
GL_MODELVIEW
)
glLoadIdentity
()
glLoadIdentity
()
#pyglet stuff
self
.
vpmat
=
(
GLint
*
4
)(
0
,
0
,
*
list
(
self
.
GetClientSize
()))
self
.
vpmat
=
(
GLint
*
4
)(
0
,
0
,
*
list
(
self
.
GetClientSize
()))
glGetDoublev
(
GL_PROJECTION_MATRIX
,
self
.
pmat
)
glGetDoublev
(
GL_PROJECTION_MATRIX
,
self
.
pmat
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment