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
d76b9551
Commit
d76b9551
authored
Mar 26, 2014
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Skip size/reshape events in glpanel when frozen/too small
parent
ce9c26e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
panel.py
printrun/gl/panel.py
+5
-0
No files found.
printrun/gl/panel.py
View file @
d76b9551
...
@@ -69,6 +69,9 @@ class wxGLPanel(wx.Panel):
...
@@ -69,6 +69,9 @@ class wxGLPanel(wx.Panel):
def
processSizeEvent
(
self
,
event
):
def
processSizeEvent
(
self
,
event
):
'''Process the resize event.'''
'''Process the resize event.'''
if
self
.
IsFrozen
():
event
.
Skip
()
return
if
(
wx
.
VERSION
>
(
2
,
9
)
and
self
.
canvas
.
IsShownOnScreen
())
or
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
.
canvas
.
SetCurrent
(
self
.
context
)
self
.
canvas
.
SetCurrent
(
self
.
context
)
...
@@ -121,6 +124,8 @@ class wxGLPanel(wx.Panel):
...
@@ -121,6 +124,8 @@ class wxGLPanel(wx.Panel):
size
=
self
.
GetClientSize
()
size
=
self
.
GetClientSize
()
oldwidth
,
oldheight
=
self
.
width
,
self
.
height
oldwidth
,
oldheight
=
self
.
width
,
self
.
height
width
,
height
=
size
.
width
,
size
.
height
width
,
height
=
size
.
width
,
size
.
height
if
width
<
1
or
height
<
1
:
return
self
.
width
=
max
(
float
(
width
),
1.0
)
self
.
width
=
max
(
float
(
width
),
1.0
)
self
.
height
=
max
(
float
(
height
),
1.0
)
self
.
height
=
max
(
float
(
height
),
1.0
)
self
.
OnInitGL
(
call_reshape
=
False
)
self
.
OnInitGL
(
call_reshape
=
False
)
...
...
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