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
5bb5c748
Commit
5bb5c748
authored
Mar 30, 2013
by
Luke Campagnola
Browse files
Prevent updating ViewBox matrix in setRange when no changes have been made to range
parent
ee89b291
Changes
1
Hide whitespace changes
Inline
Side-by-side
pyqtgraph/graphicsItems/ViewBox/ViewBox.py
View file @
5bb5c748
...
@@ -87,6 +87,7 @@ class ViewBox(GraphicsWidget):
...
@@ -87,6 +87,7 @@ class ViewBox(GraphicsWidget):
self
.
addedItems
=
[]
self
.
addedItems
=
[]
#self.gView = view
#self.gView = view
#self.showGrid = showGrid
#self.showGrid = showGrid
self
.
matrixNeedsUpdate
=
True
## indicates that range has changed, but matrix update was deferred
self
.
state
=
{
self
.
state
=
{
...
@@ -406,8 +407,11 @@ class ViewBox(GraphicsWidget):
...
@@ -406,8 +407,11 @@ class ViewBox(GraphicsWidget):
self
.
sigStateChanged
.
emit
(
self
)
self
.
sigStateChanged
.
emit
(
self
)
if
update
:
if
update
and
(
any
(
changed
)
or
self
.
matrixNeedsUpdate
)
:
self
.
updateMatrix
(
changed
)
self
.
updateMatrix
(
changed
)
if
not
update
and
any
(
changed
):
self
.
matrixNeedsUpdate
=
True
for
ax
,
range
in
changes
.
items
():
for
ax
,
range
in
changes
.
items
():
link
=
self
.
linkedView
(
ax
)
link
=
self
.
linkedView
(
ax
)
...
@@ -1246,6 +1250,7 @@ class ViewBox(GraphicsWidget):
...
@@ -1246,6 +1250,7 @@ class ViewBox(GraphicsWidget):
self
.
sigRangeChanged
.
emit
(
self
,
self
.
state
[
'viewRange'
])
self
.
sigRangeChanged
.
emit
(
self
,
self
.
state
[
'viewRange'
])
self
.
sigTransformChanged
.
emit
(
self
)
## segfaults here: 1
self
.
sigTransformChanged
.
emit
(
self
)
## segfaults here: 1
self
.
matrixNeedsUpdate
=
False
def
paint
(
self
,
p
,
opt
,
widget
):
def
paint
(
self
,
p
,
opt
,
widget
):
if
self
.
border
is
not
None
:
if
self
.
border
is
not
None
:
...
...
Write
Preview
Supports
Markdown
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