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
76818fc0
Commit
76818fc0
authored
Jul 10, 2011
by
kliment
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix crash on new file load
parent
61af573e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
16 deletions
+13
-16
gviz.py
gviz.py
+12
-15
pronsole.py
pronsole.py
+1
-1
No files found.
gviz.py
View file @
76818fc0
...
...
@@ -23,13 +23,13 @@ class window(wx.Frame):
#print p.lines.keys()
def
zoom
(
self
,
event
):
z
=
event
.
GetWheelRotation
()
if
event
.
ShiftDown
():
if
z
>
0
:
self
.
p
.
layerdown
()
elif
z
<
0
:
self
.
p
.
layerup
()
else
:
if
z
>
0
:
self
.
p
.
zoom
(
event
.
GetX
(),
event
.
GetY
(),
1.2
)
elif
z
<
0
:
self
.
p
.
zoom
(
event
.
GetX
(),
event
.
GetY
(),
1
/
1.2
)
z
=
event
.
GetWheelRotation
()
if
event
.
ShiftDown
():
if
z
>
0
:
self
.
p
.
layerdown
()
elif
z
<
0
:
self
.
p
.
layerup
()
else
:
if
z
>
0
:
self
.
p
.
zoom
(
event
.
GetX
(),
event
.
GetY
(),
1.2
)
elif
z
<
0
:
self
.
p
.
zoom
(
event
.
GetX
(),
event
.
GetY
(),
1
/
1.2
)
class
gviz
(
wx
.
Panel
):
def
__init__
(
self
,
parent
,
size
=
(
200
,
200
),
bedsize
=
(
200
,
200
)):
...
...
@@ -61,10 +61,7 @@ class gviz(wx.Panel):
self
.
layerindex
=
0
self
.
showall
=
0
self
.
dirty
=
1
self
.
blitmap
=
wx
.
EmptyBitmap
(
self
.
GetClientSize
()[
0
],
self
.
GetClientSize
()[
1
],
-
1
)
self
.
repaint
()
#self.repaint()
def
layerup
(
self
):
if
(
self
.
layerindex
+
1
<
len
(
self
.
layers
)):
self
.
layerindex
+=
1
...
...
@@ -88,10 +85,10 @@ class gviz(wx.Panel):
def
zoom
(
self
,
x
,
y
,
factor
):
self
.
scale
=
[
s
*
factor
for
s
in
self
.
scale
]
self
.
translate
=
[
x
-
(
x
-
self
.
translate
[
0
])
*
factor
,
y
-
(
y
-
self
.
translate
[
1
])
*
factor
]
#self.dirty=1
self
.
scale
=
[
s
*
factor
for
s
in
self
.
scale
]
self
.
translate
=
[
x
-
(
x
-
self
.
translate
[
0
])
*
factor
,
y
-
(
y
-
self
.
translate
[
1
])
*
factor
]
#self.dirty=1
self
.
repaint
()
self
.
Refresh
()
...
...
pronsole.py
View file @
76818fc0
...
...
@@ -620,7 +620,7 @@ class pronsole(cmd.Cmd):
def
do_sdprint
(
self
,
l
):
if
not
self
.
p
.
online
:
print
"Printer is not online. Try connect to it first."
print
"Printer is not online. Try connect to it first."
return
self
.
listing
=
2
self
.
sdfiles
=
[]
...
...
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