SourceForge: tortoisehg/tortoisehg: changeset 4152:ba55fa59a09f
history: Preserve branch selection when compact-graph is toggled
authorPeer Sommerlund <peso@users.sourceforge.net>
Wed Sep 23 09:20:56 2009 +0200 (2 months ago)
changeset 4152ba55fa59a09f
parent 41502bfe0921b4ce
child 4153f2d2f56a8dc2
history: Preserve branch selection when compact-graph is toggled

The new toggles in the View menu cause a clean reload.
If a filter previously passed a parameter to reload_log this could
be cleared. This was the case for the branch filter, so toggling
compact graph while a branch was selected would clear the
branch selection.
tortoisehg/hgtk/history.py
     1.1 --- a/tortoisehg/hgtk/history.py	Tue Sep 22 13:30:26 2009 -0500
     1.2 +++ b/tortoisehg/hgtk/history.py	Wed Sep 23 09:20:56 2009 +0200
     1.3 @@ -401,7 +401,9 @@
     1.4          opts = {'date': None, 'no_merges':False, 'only_merges':False,
     1.5                  'keyword':[], 'branch':None, 'pats':[], 'filehist':None,
     1.6                  'revrange':[], 'revlist':[], 'noheads':False,
     1.7 -                'branch-view':self.compactgraph, 'rev':[] }
     1.8 +                'branch-view':False, 'rev':[] }
     1.9 +        if self.opts is not None: opts = self.opts
    1.10 +        opts['branch-view'] = self.compactgraph
    1.11          opts.update(kwopts)
    1.12  
    1.13          # handle strips, rebases, etc
    1.14 @@ -479,6 +481,9 @@
    1.15          if hasattr(self, 'mqwidget'):
    1.16              self.mqwidget.refresh()
    1.17  
    1.18 +        # Remember options to next time reload_log is called
    1.19 +        self.opts = opts
    1.20 +
    1.21      def tree_context_menu(self):
    1.22          m = gtk.Menu()
    1.23          m.append(create_menu(_('visualize change'), self.vdiff_change))