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
70ca8ace
Commit
70ca8ace
authored
May 02, 2013
by
Spencer Bliven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Setting BufferedCanvas sizes at creation.
This fixes bug #359
parent
b77ce7a2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
9 deletions
+5
-9
graph.py
printrun/graph.py
+3
-4
xybuttons.py
printrun/xybuttons.py
+1
-2
zbuttons.py
printrun/zbuttons.py
+1
-3
No files found.
printrun/graph.py
View file @
70ca8ace
...
@@ -23,14 +23,13 @@ class Graph(BufferedCanvas):
...
@@ -23,14 +23,13 @@ class Graph(BufferedCanvas):
'''A class to show a Graph with Pronterface.'''
'''A class to show a Graph with Pronterface.'''
def
__init__
(
self
,
parent
,
id
,
pos
=
wx
.
DefaultPosition
,
def
__init__
(
self
,
parent
,
id
,
pos
=
wx
.
DefaultPosition
,
size
=
wx
.
DefaultSize
,
style
=
0
):
size
=
wx
.
Size
(
150
,
80
)
,
style
=
0
):
# Forcing a no full repaint to stop flickering
# Forcing a no full repaint to stop flickering
style
=
style
|
wx
.
NO_FULL_REPAINT_ON_RESIZE
style
=
style
|
wx
.
NO_FULL_REPAINT_ON_RESIZE
#call super function
#call super function
#
super(Graph, self).__init__(parent, id, pos, size, style)
super
(
Graph
,
self
)
.
__init__
(
parent
,
id
,
pos
,
size
,
style
)
BufferedCanvas
.
__init__
(
self
,
parent
,
id
)
#
BufferedCanvas.__init__(self, parent, id)
self
.
SetSize
(
wx
.
Size
(
150
,
80
))
self
.
extruder0temps
=
[
0
]
self
.
extruder0temps
=
[
0
]
self
.
extruder0targettemps
=
[
0
]
self
.
extruder0targettemps
=
[
0
]
...
...
printrun/xybuttons.py
View file @
70ca8ace
...
@@ -60,8 +60,7 @@ class XYButtons(BufferedCanvas):
...
@@ -60,8 +60,7 @@ class XYButtons(BufferedCanvas):
self
.
bgcolor
.
SetFromName
(
bgcolor
)
self
.
bgcolor
.
SetFromName
(
bgcolor
)
self
.
bgcolormask
=
wx
.
Colour
(
self
.
bgcolor
.
Red
(),
self
.
bgcolor
.
Green
(),
self
.
bgcolor
.
Blue
(),
128
)
self
.
bgcolormask
=
wx
.
Colour
(
self
.
bgcolor
.
Red
(),
self
.
bgcolor
.
Green
(),
self
.
bgcolor
.
Blue
(),
128
)
BufferedCanvas
.
__init__
(
self
,
parent
,
ID
)
BufferedCanvas
.
__init__
(
self
,
parent
,
ID
,
size
=
self
.
bg_bmp
.
GetSize
())
self
.
SetSize
(
self
.
bg_bmp
.
GetSize
())
# Set up mouse and keyboard event capture
# Set up mouse and keyboard event capture
self
.
Bind
(
wx
.
EVT_LEFT_DOWN
,
self
.
OnLeftDown
)
self
.
Bind
(
wx
.
EVT_LEFT_DOWN
,
self
.
OnLeftDown
)
...
...
printrun/zbuttons.py
View file @
70ca8ace
...
@@ -46,9 +46,7 @@ class ZButtons(BufferedCanvas):
...
@@ -46,9 +46,7 @@ class ZButtons(BufferedCanvas):
self
.
bgcolor
.
SetFromName
(
bgcolor
)
self
.
bgcolor
.
SetFromName
(
bgcolor
)
self
.
bgcolormask
=
wx
.
Colour
(
self
.
bgcolor
.
Red
(),
self
.
bgcolor
.
Green
(),
self
.
bgcolor
.
Blue
(),
128
)
self
.
bgcolormask
=
wx
.
Colour
(
self
.
bgcolor
.
Red
(),
self
.
bgcolor
.
Green
(),
self
.
bgcolor
.
Blue
(),
128
)
BufferedCanvas
.
__init__
(
self
,
parent
,
ID
)
BufferedCanvas
.
__init__
(
self
,
parent
,
ID
,
size
=
wx
.
Size
(
59
,
244
))
self
.
SetSize
(
wx
.
Size
(
59
,
244
))
# Set up mouse and keyboard event capture
# Set up mouse and keyboard event capture
self
.
Bind
(
wx
.
EVT_LEFT_DOWN
,
self
.
OnLeftDown
)
self
.
Bind
(
wx
.
EVT_LEFT_DOWN
,
self
.
OnLeftDown
)
...
...
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