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
9181adba
Commit
9181adba
authored
Jul 19, 2013
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix potential thread race in online() callback, possibly fixing #168
parent
00c69a8a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
pronterface.py
pronterface.py
+7
-4
No files found.
pronterface.py
View file @
9181adba
...
@@ -366,19 +366,22 @@ class PronterWindow(MainWindow, pronsole.pronsole):
...
@@ -366,19 +366,22 @@ class PronterWindow(MainWindow, pronsole.pronsole):
def
online
(
self
):
def
online
(
self
):
print
_
(
"Printer is now online."
)
print
_
(
"Printer is now online."
)
wx
.
CallAfter
(
self
.
online_gui
)
def
online_gui
(
self
):
self
.
connectbtn
.
SetLabel
(
_
(
"Disconnect"
))
self
.
connectbtn
.
SetLabel
(
_
(
"Disconnect"
))
self
.
connectbtn
.
SetToolTip
(
wx
.
ToolTip
(
"Disconnect from the printer"
))
self
.
connectbtn
.
SetToolTip
(
wx
.
ToolTip
(
"Disconnect from the printer"
))
self
.
connectbtn
.
Bind
(
wx
.
EVT_BUTTON
,
self
.
disconnect
)
self
.
connectbtn
.
Bind
(
wx
.
EVT_BUTTON
,
self
.
disconnect
)
for
i
in
self
.
printerControls
:
for
i
in
self
.
printerControls
:
wx
.
CallAfter
(
i
.
Enable
)
i
.
Enable
(
)
# Enable XYButtons and ZButtons
# Enable XYButtons and ZButtons
wx
.
CallAfter
(
self
.
xyb
.
enable
)
self
.
xyb
.
enable
(
)
wx
.
CallAfter
(
self
.
zb
.
enable
)
self
.
zb
.
enable
(
)
if
self
.
filename
:
if
self
.
filename
:
wx
.
CallAfter
(
self
.
printbtn
.
Enable
)
self
.
printbtn
.
Enable
(
)
def
layer_change_cb
(
self
,
newlayer
):
def
layer_change_cb
(
self
,
newlayer
):
if
self
.
compute_eta
:
if
self
.
compute_eta
:
...
...
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