8000 BUG : modified logic on starting qApp · matplotlib/matplotlib@b23396c · GitHub
[go: up one dir, main page]

Skip to content

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b23396c

Browse files
committed
BUG : modified logic on starting qApp
when working in ipython, it seems that _create_qApp is not called until the first time that a figure is made, but ipython has already started up the QApplication for us (I think) so that we never set backend_qt5 to be non-None. This seems to mostly be ok, but breaks `plt.pause`.
1 parent 5cefa83 commit b23396c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/backends/backend_qt5.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,13 +125,13 @@ def _create_qApp():
125125
"""
126126
Only one qApp can exist at a time, so check before creating one.
127127
"""
128-
if QtWidgets.QApplication.startingUp():
128+
129+
if qApp is None:
129130
if DEBUG:
130131
print("Starting up QApplication")
131132
global qApp
132133
app = QtWidgets.QApplication.instance()
133134
if app is None:
134-
135135
# check for DISPLAY env variable on X11 build of Qt
136136
if hasattr(QtGui, "QX11Info"):
137137
display = os.environ.get('DISPLAY')

0 commit comments

Comments
 (0)
0