Merge pull request #2637 from komoto48g/fix-it
Some checks failed
ci-build / build-source-dist (push) Has been cancelled
ci-build / Build wxPython documentation (push) Has been cancelled
ci-build / build-wheels (x64, macos-13, 3.10) (push) Has been cancelled
ci-build / build-wheels (x64, macos-13, 3.11) (push) Has been cancelled
ci-build / build-wheels (x64, macos-13, 3.12) (push) Has been cancelled
ci-build / build-wheels (x64, macos-13, 3.13) (push) Has been cancelled
ci-build / build-wheels (x64, macos-13, 3.9) (push) Has been cancelled
ci-build / build-wheels (x64, ubuntu-22.04, 3.10) (push) Has been cancelled
ci-build / build-wheels (x64, ubuntu-22.04, 3.11) (push) Has been cancelled
ci-build / build-wheels (x64, ubuntu-22.04, 3.12) (push) Has been cancelled
ci-build / build-wheels (x64, ubuntu-22.04, 3.13) (push) Has been cancelled
ci-build / build-wheels (x64, ubuntu-22.04, 3.9) (push) Has been cancelled
ci-build / build-wheels (x64, windows-2022, 3.10) (push) Has been cancelled
ci-build / build-wheels (x64, windows-2022, 3.11) (push) Has been cancelled
ci-build / build-wheels (x64, windows-2022, 3.12) (push) Has been cancelled
ci-build / build-wheels (x64, windows-2022, 3.13) (push) Has been cancelled
ci-build / build-wheels (x64, windows-2022, 3.9) (push) Has been cancelled
ci-build / build-wheels (x86, windows-2022, 3.10) (push) Has been cancelled
ci-build / build-wheels (x86, windows-2022, 3.11) (push) Has been cancelled
ci-build / build-wheels (x86, windows-2022, 3.12) (push) Has been cancelled
ci-build / build-wheels (x86, windows-2022, 3.13) (push) Has been cancelled
ci-build / build-wheels (x86, windows-2022, 3.9) (push) Has been cancelled
ci-build / Publish Python distribution to PyPI (push) Has been cancelled
ci-build / Create GitHub Release and upload source (push) Has been cancelled
ci-build / Upload wheels to snapshot-builds on wxpython.org (push) Has been cancelled

Fix InspectionTool crashes due to bad perspective string errros
This commit is contained in:
Scott Talbert
2024-11-07 12:15:48 -05:00
committed by GitHub
2 changed files with 4 additions and 4 deletions

View File

@@ -5178,7 +5178,7 @@ class AuiManager(wx.EvtHandler):
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

View File

@@ -405,11 +405,11 @@ class InspectionFrame(wx.Frame):
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)
@@ -430,7 +430,7 @@ class InspectionFrame(wx.Frame):
if hasattr(self, "mgr"):
perspective = self.mgr.SavePerspective()
config.Write('perspective', perspective)
config.Write('perspective1', perspective)
config.WriteBool('includeSizers', self.includeSizers)
#---------------------------------------------------------------------------