IDEFrame.py
branchpython3
changeset 3758 bc71b19b45ff
parent 3755 ca814b175391
child 3759 f713566d5d01
--- a/IDEFrame.py	Fri Oct 28 14:58:25 2022 +0800
+++ b/IDEFrame.py	Fri Oct 28 15:19:24 2022 +0800
@@ -29,7 +29,6 @@
 import wx
 import wx.grid
 import wx.aui
-from six.moves import cPickle
 
 from editors.EditorPanel import EditorPanel
 from editors.SFCViewer import SFC_Viewer
@@ -880,7 +879,7 @@
     def RestoreLastState(self):
         frame_size = None
         if self.Config.HasEntry("framesize"):
-            frame_size = cPickle.loads(str(self.Config.Read("framesize")))
+            frame_size = pickle.loads(self.Config.Read("framesize").encode())
 
         if frame_size is None:
             self.Maximize()
@@ -889,7 +888,7 @@
 
     def SaveLastState(self):
         if not self.IsMaximized():
-            self.Config.Write("framesize", cPickle.dumps(self.GetClientSize()))
+            self.Config.Write("framesize", pickle.dumps(self.GetClientSize(), 0))
         elif self.Config.HasEntry("framesize"):
             self.Config.DeleteEntry("framesize")