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

Skip to content

Commit 3c61684

Browse files
committed
fixed a resize bug: loc label in navtoolbar was causing the figure
window to expand horizontally svn path=/trunk/matplotlib/; revision=2623
1 parent da94b46 commit 3c61684

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

lib/matplotlib/backends/backend_qt4.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,13 +274,15 @@ def _init_toolbar( self ):
274274
# will resize this label instead of the buttons.
275275
self.locLabel = QtGui.QLabel( "", self )
276276
self.locLabel.setAlignment( QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter )
277+
self.locLabel.setSizePolicy(QtGui.QSizePolicy(QtGui.QSizePolicy.Ignored,
278+
QtGui.QSizePolicy.Ignored))
277279
self.layout.addWidget( self.locLabel, 1 )
278280

279281
def dynamic_update( self ):
280282
self.canvas.draw()
281283

282284
def set_message( self, s ):
283-
self.locLabel.setText( s )
285+
self.locLabel.setText( s.replace(', ', '\n') )
284286

285287
def set_cursor( self, cursor ):
286288
if DEBUG: print 'Set cursor' , cursor

0 commit comments

Comments
 (0)