File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -595,7 +595,7 @@ def set_central_widget(self, name):
595
595
current .hide_plugin ()
596
596
else :
597
597
current_pos = self .dockWidgetArea (current .dock )
598
- if current_pos == new_pos :
598
+ if current_pos == new_pos and new_width :
599
599
dock_widths [current ] = new_width
600
600
601
601
self ._custom_layout_timer = QTimer (self )
@@ -607,9 +607,11 @@ def _reset_dock_widths(self):
607
607
# resize the plugins
608
608
if with_qt5 :
609
609
for w , width in self ._dock_widths .items ():
610
- self .resizeDocks ([w .dock ], [width ], Qt .Horizontal )
610
+ if w .dock is not None :
611
+ self .resizeDocks ([w .dock ], [width ], Qt .Horizontal )
611
612
for w , height in self ._dock_heights .items ():
612
- self .resizeDocks ([w .dock ], [height ], Qt .Vertical )
613
+ if w .dock is not None :
614
+ self .resizeDocks ([w .dock ], [height ], Qt .Vertical )
613
615
614
616
self .setUpdatesEnabled (True )
615
617
You can’t perform that action at this time.
0 commit comments