Skip to content

Commit

Permalink
Merge pull request #2637 from komoto48g/fix-it
Browse files Browse the repository at this point in the history
Fix InspectionTool crashes due to bad perspective string errros
  • Loading branch information
swt2c authored Nov 7, 2024
2 parents 74f2381 + ba0e6b0 commit 41823e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion wx/lib/agw/aui/framemanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -5178,7 +5178,7 @@ def LoadPaneInfo(self, pane_part, pane):
elif val_name == "transparent":
pane.transparent = int(value)
else:
raise Exception("Bad perspective string")
raise Exception("Bad perspective string", val_name)

# replace escaped characters so we can
# split up the string easily
Expand Down
6 changes: 3 additions & 3 deletions wx/lib/inspection.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,11 +405,11 @@ def LoadSettings(self, config):
rect = utils.AdjustRectToScreen(self.GetRect())
self.SetRect(rect)

perspective = config.Read('perspective', '')
perspective = config.Read('perspective1', '')
if perspective:
try:
self.mgr.LoadPerspective(perspective)
except wx.PyAssertionError:
except Exception:
# ignore bad perspective string errors
pass
self.includeSizers = config.ReadBool('includeSizers', False)
Expand All @@ -430,7 +430,7 @@ def SaveSettings(self, config):

if hasattr(self, "mgr"):
perspective = self.mgr.SavePerspective()
config.Write('perspective', perspective)
config.Write('perspective1', perspective)
config.WriteBool('includeSizers', self.includeSizers)

#---------------------------------------------------------------------------
Expand Down

0 comments on commit 41823e3

Please sign in to comment.