/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to branchview/treeview.py

  • Committer: Jelmer Vernooij
  • Date: 2008-07-18 12:29:56 UTC
  • mfrom: (531.7.14 vis-enhancements)
  • Revision ID: jelmer@samba.org-20080718122956-27468cxu2b613ib8
Merge diff widget in viz.

Show diffs side-by-side

added added

removed removed

Lines of Context:
325
325
        if set_tooltip is not None:
326
326
            set_tooltip(treemodel.MESSAGE)
327
327
 
 
328
        self._prev_cursor_path = None
328
329
        self.treeview.connect("cursor-changed",
329
330
                self._on_selection_changed)
330
331
 
400
401
    def _on_selection_changed(self, treeview):
401
402
        """callback for when the treeview changes."""
402
403
        (path, focus) = treeview.get_cursor()
403
 
        if path is not None:
 
404
        if (path is not None) and (path != self._prev_cursor_path):
 
405
            self._prev_cursor_path = path # avoid emitting twice per click
404
406
            self.iter = self.model.get_iter(path)
405
407
            self.emit('revision-selected')
406
408