@@ -464,8 +464,17 @@ def restore_window(self,tab_data):
464464 # Actually this is a waste of time because if you close when maximized, reoopen and then
465465 # de-maximize, the window moves to a random position (not the position it was at before maximizing)
466466 # so bleh!
467- self .ui .move (tab_data ['BLACS settings' ]["window_xpos" ]- tab_data ['BLACS settings' ]['window_frame_width' ]/ 2 ,tab_data ['BLACS settings' ]["window_ypos" ]- tab_data ['BLACS settings' ]['window_frame_height' ]+ tab_data ['BLACS settings' ]['window_frame_width' ]/ 2 )
468- self .ui .resize (tab_data ['BLACS settings' ]["window_width" ],tab_data ['BLACS settings' ]["window_height" ])
467+ self .ui .move (
468+ tab_data ['BLACS settings' ]["window_xpos" ]
469+ - tab_data ['BLACS settings' ]['window_frame_width' ] // 2 ,
470+ tab_data ['BLACS settings' ]["window_ypos" ]
471+ - tab_data ['BLACS settings' ]['window_frame_height' ]
472+ + tab_data ['BLACS settings' ]['window_frame_width' ] // 2 ,
473+ )
474+ self .ui .resize (
475+ tab_data ['BLACS settings' ]["window_width" ],
476+ tab_data ['BLACS settings' ]["window_height" ],
477+ )
469478
470479 if 'window_maximized' in tab_data ['BLACS settings' ] and tab_data ['BLACS settings' ]['window_maximized' ]:
471480 self .ui .showMaximized ()
@@ -474,7 +483,7 @@ def restore_window(self,tab_data):
474483 pane .setSizes (tab_data ['BLACS settings' ][pane_name ])
475484
476485 except Exception as e :
477- logger .warning ("Unable to load window and notebook defaults. Exception:" + str (e ))
486+ logger .exception ("Unable to load window and notebook defaults. Exception:" + str (e ))
478487
479488 def order_tabs (self ,tab_data ):
480489 # Move the tabs to the correct notebook
0 commit comments