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 @@ -474,18 +474,18 @@ def __init__(self, canvas, num):
474
474
475
475
self .window ._destroying = False
476
476
477
+ # add text label to status bar
478
+ self .statusbar_label = QtWidgets .QLabel ()
479
+ self .window .statusBar ().addWidget (self .statusbar_label )
480
+
477
481
self .toolbar = self ._get_toolbar (self .canvas , self .window )
478
482
if self .toolbar is not None :
479
483
self .window .addToolBar (self .toolbar )
480
- self .toolbar .message .connect (self ._show_message )
484
+ self .toolbar .message .connect (self .statusbar_label . setText )
481
485
tbs_height = self .toolbar .sizeHint ().height ()
482
486
else :
483
487
tbs_height = 0
484
488
485
- # add text label to status bar
486
- self .statusbar_label = QtWidgets .QLabel ()
487
- self .window .statusBar ().addWidget (self .statusbar_label )
488
-
489
489
# resize the main window so it will display the canvas with the
490
490
# requested size:
491
491
cs = canvas .sizeHint ()
@@ -507,10 +507,6 @@ def notify_axes_change(fig):
507
507
self .canvas .figure .add_axobserver (notify_axes_change )
508
508
self .window .raise_ ()
509
509
510
- @QtCore .Slot ()
511
- def _show_message (self , s ):
512
- self .statusbar_label .setText (s )
513
-
514
510
def full_screen_toggle (self ):
515
511
if self .window .isFullScreen ():
516
512
self .window .showNormal ()
You can’t perform that action at this time.
0 commit comments