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
826c9ed7
Commit
826c9ed7
authored
Jun 15, 2013
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix zooming using keystrokes in gcview
parent
09fe67b5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
gcview.py
printrun/gcview.py
+8
-9
No files found.
printrun/gcview.py
View file @
826c9ed7
...
@@ -411,23 +411,22 @@ class GcodeViewPanel(wxGLPanel):
...
@@ -411,23 +411,22 @@ class GcodeViewPanel(wxGLPanel):
def
keypress
(
self
,
event
):
def
keypress
(
self
,
event
):
"""gets keypress events and moves/rotates acive shape"""
"""gets keypress events and moves/rotates acive shape"""
keycode
=
event
.
GetKeyCode
()
step
=
1.1
step
=
10
if
event
.
ControlDown
():
if
event
.
ControlDown
():
step
=
3
step
=
1.05
kup
=
[
85
,
315
]
# Up keys
kup
=
[
85
,
315
]
# Up keys
kdo
=
[
68
,
317
]
# Down Keys
kdo
=
[
68
,
317
]
# Down Keys
kzi
=
[
wx
.
WXK_PAGEDOWN
,
388
,
316
,
61
]
# Zoom In Keys
kzi
=
[
wx
.
WXK_PAGEDOWN
,
388
,
316
,
61
]
# Zoom In Keys
kzo
=
[
wx
.
WXK_PAGEUP
,
390
,
314
,
45
]
# Zoom Out Keys
kzo
=
[
wx
.
WXK_PAGEUP
,
390
,
314
,
45
]
# Zoom Out Keys
x
=
event
.
GetKeyCode
()
key
=
event
.
GetKeyCode
()
if
x
in
kup
:
if
key
in
kup
:
self
.
layerup
()
self
.
layerup
()
if
x
in
kdo
:
if
key
in
kdo
:
self
.
layerdown
()
self
.
layerdown
()
if
x
in
kzi
:
if
key
in
kzi
:
self
.
zoom
(
step
)
self
.
zoom
(
step
)
if
x
in
kzo
:
if
key
in
kzo
:
self
.
zoom
(
-
step
)
self
.
zoom
(
1
/
step
)
event
.
Skip
()
event
.
Skip
()
wx
.
CallAfter
(
self
.
Refresh
)
wx
.
CallAfter
(
self
.
Refresh
)
...
...
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