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

def hgviewlib::qt4::hgfileviewer::FileDiffViewer::vbar_changed (   self,
  value,
  side 
)

Callback called when the vertical scrollbar of a file viewer
is changed, so we can update the position of the other file
viewer.

Definition at line 454 of file hgfileviewer.py.

00454                                        :
        """
        Callback called when the vertical scrollbar of a file viewer
        is changed, so we can update the position of the other file
        viewer.
        """
        if self._invbarchanged:
            # prevent loops in changes (left -> right -> left ...)
            return
        self._invbarchanged = True
        oside = otherside[side]

        for i, (lo, hi) in enumerate(self._diffmatch[side]):
            if lo <= value < hi:
                break
        dv = value - lo

        blo, bhi = self._diffmatch[oside][i]
        vbar = self.viewers[oside].verticalScrollBar()
        if (dv) < (bhi - blo):
            bvalue = blo + dv
        else:
            bvalue = bhi
        vbar.setValue(bvalue)
        self._invbarchanged = False

    def revisionSelected(self, rev):


Generated by  Doxygen 1.6.0   Back to index