Logo Search packages:      
Sourcecode: pythoncard version File versions  Download package

def textRouter::TextRouter::restoreState (   self  ) 

Restores the last text and selection state from the undo history stack.

Definition at line 198 of file textRouter.py.

00198                           :
        """Restores the last text and selection state from the undo history stack."""
        if self.undoStackPos+1 == len(self.undoStack) or self.undoStackPos == \
               (self.generalPrefs["undoHistorySize"]+1):
            # no more undo info
            val = []
        else:
            self.undoStackPos = self.undoStackPos + 1
            val = self.undoStack[self.undoStackPos]

        #print "===== UNDO"
        #print "    undoStackPosition %d" % self.undoStackPos
        #print "    stack size %d" % len(self.undoStack)
        #print "----- stack:"
        #for state in self.undoStack:
            #print "    Text:" + state[0][0:40]
            #print "    (%d, %d)" % (state[1][0], state[1][1])
            #print "VAL:"
            #print val
            #print ""

        return val
    

    def doRedo(self):


Generated by  Doxygen 1.6.0   Back to index