Revision: 8664
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8664&view=rev
Author: efiring
Date: 2010-08-27 07:13:14 +0000 (Fri, 27 Aug 2010)
Log Message:
-----------
backend_qt4: don't make app if ipython already made it; patch by Brian Granger
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/backends/backend_qt4.py
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_qt4.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_qt4.py 2010-08-26
03:49:17 UTC (rev 8663)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_qt4.py 2010-08-27
07:13:14 UTC (rev 8664)
@@ -50,11 +50,16 @@
if QtGui.QApplication.startingUp():
if DEBUG: print "Starting up QApplication"
global qApp
- qApp = QtGui.QApplication( [" "] )
- QtCore.QObject.connect( qApp, QtCore.SIGNAL( "lastWindowClosed()" ),
- qApp, QtCore.SLOT( "quit()" ) )
- #remember that matplotlib created the qApp - will be used by show()
- _create_qApp.qAppCreatedHere = True
+ app = QtGui.QApplication.instance()
+ if app is None:
+ qApp = QtGui.QApplication( [" "] )
+ QtCore.QObject.connect( qApp, QtCore.SIGNAL( "lastWindowClosed()"
),
+ qApp, QtCore.SLOT( "quit()" ) )
+ #remember that matplotlib created the qApp - will be used by show()
+ _create_qApp.qAppCreatedHere = True
+ else:
+ qApp = app
+ _create_qApp.qAppCreatedHere = False
_create_qApp.qAppCreatedHere = False
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users
worldwide. Take advantage of special opportunities to increase revenue and
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins