File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed
Filter options
Expand file tree Collapse file tree 1 file changed +5
-9
lines changed
Original file line number Diff line number Diff line change @@ -459,18 +459,18 @@ def __init__(self, canvas, num):
459
459
460
460
self .window ._destroying = False
461
461
462
+ # add text label to status bar
463
+ self .statusbar_label = QtWidgets .QLabel ()
464
+ self .window .statusBar ().addWidget (self .statusbar_label )
465
+
462
466
self .toolbar = self ._get_toolbar (self .canvas , self .window )
463
467
if self .toolbar is not None :
464
468
self .window .addToolBar (self .toolbar )
465
- self .toolbar .message .connect (self ._show_message )
469
+ self .toolbar .message .connect (self .statusbar_label . setText )
466
470
tbs_height = self .toolbar .sizeHint ().height ()
467
471
else :
468
472
tbs_height = 0
469
473
470
- # add text label to status bar
471
- self .statusbar_label = QtWidgets .QLabel ()
472
- self .window .statusBar ().addWidget (self .statusbar_label )
473
-
474
474
# resize the main window so it will display the canvas with the
475
475
# requested size:
476
476
cs = canvas .sizeHint ()
@@ -491,10 +491,6 @@ def notify_axes_change(fig):
491
491
self .toolbar .update ()
492
492
self .canvas .figure .add_axobserver (notify_axes_change )
493
493
494
- @QtCore .Slot ()
495
- def _show_message (self , s ):
496
- self .statusbar_label .setText (s )
497
-
498
494
def full_screen_toggle (self ):
499
495
if self .window .isFullScreen ():
500
496
self .window .showNormal ()
You can’t perform that action at this time.
0 commit comments