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
168db35b
Commit
168db35b
authored
Nov 12, 2013
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better fix for #438
parent
32e97d32
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
gviz.py
printrun/gviz.py
+10
-4
No files found.
printrun/gviz.py
View file @
168db35b
...
@@ -101,8 +101,7 @@ class GvizWindow(GvizBaseFrame):
...
@@ -101,8 +101,7 @@ class GvizWindow(GvizBaseFrame):
def
process_slider
(
self
,
event
):
def
process_slider
(
self
,
event
):
self
.
p
.
layerindex
=
self
.
layerslider
.
GetValue
()
self
.
p
.
layerindex
=
self
.
layerslider
.
GetValue
()
z
=
self
.
p
.
layers
[
self
.
p
.
layerindex
]
z
=
self
.
p
.
get_currentz
()
z
=
0.
if
z
is
None
else
z
self
.
SetStatusText
(
_
(
"Layer
%
d - Going Up - Z =
%.03
f mm"
)
%
(
self
.
p
.
layerindex
+
1
,
z
),
0
)
self
.
SetStatusText
(
_
(
"Layer
%
d - Going Up - Z =
%.03
f mm"
)
%
(
self
.
p
.
layerindex
+
1
,
z
),
0
)
self
.
p
.
dirty
=
1
self
.
p
.
dirty
=
1
wx
.
CallAfter
(
self
.
p
.
Refresh
)
wx
.
CallAfter
(
self
.
p
.
Refresh
)
...
@@ -229,10 +228,16 @@ class Gviz(wx.Panel):
...
@@ -229,10 +228,16 @@ class Gviz(wx.Panel):
self
.
dirty
=
1
self
.
dirty
=
1
wx
.
CallAfter
(
self
.
Refresh
)
wx
.
CallAfter
(
self
.
Refresh
)
def
get_currentz
(
self
):
z
=
self
.
layers
[
self
.
layerindex
]
z
=
0.
if
z
is
None
else
z
return
z
def
layerup
(
self
):
def
layerup
(
self
):
if
self
.
layerindex
+
1
<
len
(
self
.
layers
):
if
self
.
layerindex
+
1
<
len
(
self
.
layers
):
self
.
layerindex
+=
1
self
.
layerindex
+=
1
self
.
parent
.
SetStatusText
(
_
(
"Layer
%
d - Going Up - Z =
%.03
f mm"
)
%
(
self
.
layerindex
+
1
,
self
.
layers
[
self
.
layerindex
]),
0
)
z
=
self
.
get_currentz
()
self
.
parent
.
SetStatusText
(
_
(
"Layer
%
d - Going Up - Z =
%.03
f mm"
)
%
(
self
.
layerindex
+
1
,
z
),
0
)
self
.
dirty
=
1
self
.
dirty
=
1
self
.
parent
.
setlayercb
(
self
.
layerindex
)
self
.
parent
.
setlayercb
(
self
.
layerindex
)
wx
.
CallAfter
(
self
.
Refresh
)
wx
.
CallAfter
(
self
.
Refresh
)
...
@@ -240,7 +245,8 @@ class Gviz(wx.Panel):
...
@@ -240,7 +245,8 @@ class Gviz(wx.Panel):
def
layerdown
(
self
):
def
layerdown
(
self
):
if
self
.
layerindex
>
0
:
if
self
.
layerindex
>
0
:
self
.
layerindex
-=
1
self
.
layerindex
-=
1
self
.
parent
.
SetStatusText
(
_
(
"Layer
%
d - Going Down - Z =
%.03
f mm"
)
%
(
self
.
layerindex
+
1
,
self
.
layers
[
self
.
layerindex
]),
0
)
z
=
self
.
get_currentz
()
self
.
parent
.
SetStatusText
(
_
(
"Layer
%
d - Going Down - Z =
%.03
f mm"
)
%
(
self
.
layerindex
+
1
,
z
),
0
)
self
.
dirty
=
1
self
.
dirty
=
1
self
.
parent
.
setlayercb
(
self
.
layerindex
)
self
.
parent
.
setlayercb
(
self
.
layerindex
)
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