Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8a05fa0

Browse files
committed
implemented a warning for the wx sizer func if we cant find a match
svn path=/trunk/matplotlib/; revision=5459
1 parent ff2907b commit 8a05fa0

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

lib/matplotlib/backends/backend_wx.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494

9595
cvs_id = '$Id$'
9696

97-
import sys, os, os.path, math, StringIO, weakref
97+
import sys, os, os.path, math, StringIO, weakref, warnings
9898

9999
# Debugging settings here...
100100
# Debug level set here. If the debug level is less than 5, information
@@ -1235,7 +1235,9 @@ def __init__(self, num, fig):
12351235
self.SetStatusBar(statbar)
12361236
self.canvas = self.get_canvas(fig)
12371237

1238-
def do_nothing(*args, **kwargs): pass
1238+
def do_nothing(*args, **kwargs):
1239+
warnings.warn('could not find a SetSizeFunc for backend_wx; please report your wxpython version=%s to the matplotlib developers list'%backend_version)
1240+
pass
12391241

12401242
# try to find the set size func across wx versions
12411243
self.SetSizeFunc = getattr(self.canvas, 'SetInitialSize',

0 commit comments

Comments
 (0)