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
659bf144
Commit
659bf144
authored
Jul 04, 2013
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Always update mouse position
parent
f9e0b183
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
stlview.py
printrun/stlview.py
+2
-4
No files found.
printrun/stlview.py
View file @
659bf144
...
...
@@ -79,7 +79,7 @@ class StlViewPanel(wxGLPanel):
self
.
dist
=
max
(
self
.
build_dimensions
[
0
],
self
.
build_dimensions
[
1
])
self
.
basequat
=
[
0
,
0
,
0
,
1
]
wx
.
CallAfter
(
self
.
forceresize
)
self
.
mousepos
=
[
0
,
0
]
self
.
mousepos
=
(
0
,
0
)
def
OnReshape
(
self
,
width
,
height
):
self
.
mview_initialized
=
False
...
...
@@ -170,6 +170,7 @@ class StlViewPanel(wxGLPanel):
RMB: nothing
with shift move viewport
"""
self
.
mousepos
=
event
.
GetPositionTuple
()
if
event
.
Dragging
()
and
event
.
LeftIsDown
():
if
self
.
initpos
==
None
:
self
.
initpos
=
event
.
GetPositionTuple
()
...
...
@@ -216,9 +217,6 @@ class StlViewPanel(wxGLPanel):
self
.
transv
=
map
(
lambda
x
,
y
,
z
,
c
:
c
-
self
.
dist
*
(
x
-
y
)
/
z
,
list
(
p1
)
+
[
0
],
list
(
p2
)
+
[
0
],
list
(
sz
)
+
[
1
],
self
.
transv
)
self
.
initpos
=
p2
else
:
#mouse is moving without a button press
self
.
mousepos
=
event
.
GetPositionTuple
()
def
rotate_shape
(
self
,
angle
):
"""rotates acive shape
...
...
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