MCPcopy Create free account
hub / github.com/PlayOnLinux/POL-POM-4 / restorePosition

Method restorePosition

python/mainwindow.py:148–165  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

146 playonlinux.SetSettings("PANEL_PERSPECTIVE", self.getPerspective())
147
148 def restorePosition(self):
149 self.startPerspective = self.SavePerspective()
150
151 self.Update()
152
153 try:
154 setting = playonlinux.GetSettings("PANEL_PERSPECTIVE")
155 if (setting.count("Actions") < 2 or setting.count("dock_size") < 2 or not "PERSPECTIVE_NAME" in setting):
156 self.LoadPerspective(self.startPerspective)
157 else:
158 setting = setting.replace("PERSPECTIVE_NAME", self._getPerspectiveName())
159 if (setting != ""):
160 self.LoadPerspective(setting)
161
162 except wx._core.PyAssertionError:
163 self.LoadPerspective(self.startPerspective)
164
165 self.Update()
166
167 def AddPane(self, data, settings):
168 wx.aui.AuiManager.AddPane(self, data, settings)

Callers 1

__init__Method · 0.80

Calls 1

_getPerspectiveNameMethod · 0.95

Tested by

no test coverage detected