Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Benjamin Jakimow
EO Time Series Viewer
Commits
160b1ee4
Commit
160b1ee4
authored
Aug 21, 2013
by
Luke Campagnola
Browse files
Python3 bugfixes
parent
6b3cfbc6
Changes
4
Hide whitespace changes
Inline
Side-by-side
pyqtgraph/exporters/Exporter.py
View file @
160b1ee4
...
...
@@ -119,7 +119,7 @@ class Exporter(object):
else
:
childs
=
root
.
childItems
()
rootItem
=
[
root
]
childs
.
sort
(
lambda
a
,
b
:
cmp
(
a
.
zValue
()
,
b
.
zValue
())
)
childs
.
sort
(
key
=
lambda
a
:
a
.
zValue
())
while
len
(
childs
)
>
0
:
ch
=
childs
.
pop
(
0
)
tree
=
self
.
getPaintItems
(
ch
)
...
...
pyqtgraph/exporters/ImageExporter.py
View file @
160b1ee4
...
...
@@ -42,7 +42,7 @@ class ImageExporter(Exporter):
def
export
(
self
,
fileName
=
None
,
toBytes
=
False
,
copy
=
False
):
if
fileName
is
None
and
not
toBytes
and
not
copy
:
filter
=
[
"*."
+
str
(
f
)
for
f
in
QtGui
.
QImageWriter
.
supportedImageFormats
()]
filter
=
[
"*."
+
bytes
(
f
).
decode
(
'UTF-8'
)
for
f
in
QtGui
.
QImageWriter
.
supportedImageFormats
()]
preferred
=
[
'*.png'
,
'*.tif'
,
'*.jpg'
]
for
p
in
preferred
[::
-
1
]:
if
p
in
filter
:
...
...
pyqtgraph/flowchart/Flowchart.py
View file @
160b1ee4
...
...
@@ -376,10 +376,10 @@ class Flowchart(Node):
#tdeps[t] = lastNode
if
lastInd
is
not
None
:
dels
.
append
((
lastInd
+
1
,
t
))
dels
.
sort
(
lambda
a
,
b
:
cmp
(
b
[
0
],
a
[
0
]))
#dels.sort(lambda a,b: cmp(b[0], a[0]))
dels
.
sort
(
key
=
lambda
a
:
a
[
0
],
reverse
=
True
)
for
i
,
t
in
dels
:
ops
.
insert
(
i
,
(
'd'
,
t
))
return
ops
...
...
@@ -491,7 +491,8 @@ class Flowchart(Node):
self
.
clear
()
Node
.
restoreState
(
self
,
state
)
nodes
=
state
[
'nodes'
]
nodes
.
sort
(
lambda
a
,
b
:
cmp
(
a
[
'pos'
][
0
],
b
[
'pos'
][
0
]))
#nodes.sort(lambda a, b: cmp(a['pos'][0], b['pos'][0]))
nodes
.
sort
(
key
=
lambda
a
:
a
[
'pos'
][
0
])
for
n
in
nodes
:
if
n
[
'name'
]
in
self
.
_nodes
:
#self._nodes[n['name']].graphicsItem().moveBy(*n['pos'])
...
...
pyqtgraph/opengl/GLViewWidget.py
View file @
160b1ee4
...
...
@@ -167,7 +167,7 @@ class GLViewWidget(QtOpenGL.QGLWidget):
else
:
items
=
item
.
childItems
()
items
.
append
(
item
)
items
.
sort
(
lambda
a
,
b
:
cmp
(
a
.
depthValue
()
,
b
.
depthValue
())
)
items
.
sort
(
key
=
lambda
a
:
a
.
depthValue
())
for
i
in
items
:
if
not
i
.
visible
():
continue
...
...
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