TextViewer.py
changeset 704 aca0c83ed82e
parent 699 649399ffdaf0
child 716 2681a6da58d6
equal deleted inserted replaced
703:1a14560e10ed 704:aca0c83ed82e
   246     
   246     
   247     def GetState(self):
   247     def GetState(self):
   248         return {"cursor_pos": self.Editor.GetCurrentPos()}
   248         return {"cursor_pos": self.Editor.GetCurrentPos()}
   249     
   249     
   250     def SetState(self, state):
   250     def SetState(self, state):
   251         if self:
   251         if self and state.has_key("cursor_pos"):
   252             self.Editor.GotoPos(state.get("cursor_pos", 0))
   252             self.Editor.GotoPos(state.get("cursor_pos", 0))
   253         
   253         
   254     def OnModification(self, event):
   254     def OnModification(self, event):
   255         if not self.DisableEvents:
   255         if not self.DisableEvents:
   256             mod_type = event.GetModificationType()
   256             mod_type = event.GetModificationType()