Fixes DockArea save/restore when topContainer is None (i.e. when no docks are present, or when all are in temporary windows).
This commit is contained in:
parent
b700a1ad3d
commit
fe8e7e59db
@ -197,7 +197,13 @@ class DockArea(Container, QtGui.QWidget, DockDrop):
|
|||||||
"""
|
"""
|
||||||
Return a serialized (storable) representation of the state of
|
Return a serialized (storable) representation of the state of
|
||||||
all Docks in this DockArea."""
|
all Docks in this DockArea."""
|
||||||
state = {'main': self.childState(self.topContainer), 'float': []}
|
|
||||||
|
if self.topContainer is None:
|
||||||
|
main = None
|
||||||
|
else:
|
||||||
|
main = self.childState(self.topContainer)
|
||||||
|
|
||||||
|
state = {'main': main, 'float': []}
|
||||||
for a in self.tempAreas:
|
for a in self.tempAreas:
|
||||||
geo = a.win.geometry()
|
geo = a.win.geometry()
|
||||||
geo = (geo.x(), geo.y(), geo.width(), geo.height())
|
geo = (geo.x(), geo.y(), geo.width(), geo.height())
|
||||||
@ -229,6 +235,7 @@ class DockArea(Container, QtGui.QWidget, DockDrop):
|
|||||||
#print "found docks:", docks
|
#print "found docks:", docks
|
||||||
|
|
||||||
## 2) create container structure, move docks into new containers
|
## 2) create container structure, move docks into new containers
|
||||||
|
if state['main'] is not None:
|
||||||
self.buildFromState(state['main'], docks, self)
|
self.buildFromState(state['main'], docks, self)
|
||||||
|
|
||||||
## 3) create floating areas, populate
|
## 3) create floating areas, populate
|
||||||
|
Loading…
Reference in New Issue
Block a user