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
824e4b37
Commit
824e4b37
authored
Aug 23, 2013
by
Luke Campagnola
Browse files
Corrected behavior of GraphicsView.setBackground
parent
d3f56c6d
Changes
1
Hide whitespace changes
Inline
Side-by-side
pyqtgraph/widgets/GraphicsView.py
View file @
824e4b37
...
...
@@ -82,6 +82,7 @@ class GraphicsView(QtGui.QGraphicsView):
## This might help, but it's probably dangerous in the general case..
#self.setOptimizationFlag(self.DontSavePainterState, True)
self
.
setBackgroundRole
(
QtGui
.
QPalette
.
NoRole
)
self
.
setBackground
(
background
)
self
.
setFocusPolicy
(
QtCore
.
Qt
.
StrongFocus
)
...
...
@@ -138,12 +139,9 @@ class GraphicsView(QtGui.QGraphicsView):
self
.
_background
=
background
if
background
==
'default'
:
background
=
pyqtgraph
.
getConfigOption
(
'background'
)
if
background
is
None
:
self
.
setBackgroundRole
(
QtGui
.
QPalette
.
NoRole
)
else
:
brush
=
fn
.
mkBrush
(
background
)
self
.
setBackgroundBrush
(
brush
)
brush
=
fn
.
mkBrush
(
background
)
self
.
setBackgroundBrush
(
brush
)
def
paintEvent
(
self
,
ev
):
self
.
scene
().
prepareForPaint
()
#print "GV: paint", ev.rect()
...
...
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