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
a868e571
Commit
a868e571
authored
Sep 05, 2012
by
Christopher Keller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug that caused divide by zero error if main gviz window was sized too small.
parent
9f848c76
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
gviz.py
printrun/gviz.py
+2
-0
No files found.
printrun/gviz.py
View file @
a868e571
...
@@ -218,6 +218,8 @@ class gviz(wx.Panel):
...
@@ -218,6 +218,8 @@ class gviz(wx.Panel):
def
resize
(
self
,
event
):
def
resize
(
self
,
event
):
size
=
self
.
GetClientSize
()
size
=
self
.
GetClientSize
()
size
=
[
max
(
1.0
,
size
[
0
]),
max
(
1.0
,
size
[
1
])]
self
.
size
=
[
max
(
1.0
,
self
.
size
[
0
]),
max
(
1.0
,
self
.
size
[
1
])]
newsize
=
min
(
float
(
size
[
0
])
/
self
.
size
[
0
],
float
(
size
[
1
])
/
self
.
size
[
1
])
newsize
=
min
(
float
(
size
[
0
])
/
self
.
size
[
0
],
float
(
size
[
1
])
/
self
.
size
[
1
])
self
.
size
=
self
.
GetClientSize
()
self
.
size
=
self
.
GetClientSize
()
wx
.
CallAfter
(
self
.
zoom
,
0
,
0
,
newsize
)
wx
.
CallAfter
(
self
.
zoom
,
0
,
0
,
newsize
)
...
...
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