Tree view doesn't remember selection
Reported by Joshua Davey | April 12th, 2009 @ 01:34 AM | in 0.8
If you're browsing git objects in the Tree history view, and you switch commits, the selection always goes back up to the first object, (which is normally something like the .gitignore file).
I've tooled around with, PBGitHistoryController but I can't seem to find where the actual refresh is getting called, so that a selection could be remembered. I would consider this a bug, as it is a nuisance to always be forced to look at the very first object in a commit, even if I'm really interested in the history of a particular object/group of objects.
One solution might look something like (in pseudo-code):
@@@ if ([selection count] == 1) { oldSelection = selected; [view refresh]; // Whatever the actual method/delegate for refreshing the view is selectedObject = [arrayOfObjects indexForObject: oldSelection ]; // Try to select that object with the same name }@@@
Clearly, this isn't even real, but I think you might get my point.
Comments and changes to this ticket
-

Johannes Gilger September 5th, 2009 @ 09:42 AM
- Milestone set to 0.8
- State changed from new to open
This ticket is something that really annoys me too and is needed for working with the tree-view so I'm pushing it for 0.8
-

Pieter de Bie September 5th, 2009 @ 11:52 AM
I've thought about this a bit and it's really annoying. I'm not sure
if there's another solution for this, but I think we should use the
same process here as we use in the commit view -- remove all nodes
that aren't in the ne commit anymore, and then add new nodes. Sort of
like applying a diff instead of rebuilding the tree every time. The
advantage of that is that it'll remember the current tree state,
including the selection. If we abstract it in the right way, we can
also use it in the commit view, and switch that view to a more
tree-like something, which I think would be a good idea. -

Warren Harris September 8th, 2009 @ 06:07 PM
I vote for this one to get fixed too. It would be great to be able to quickly switch between commits and immediately see the changes to the file that's selected in the tree view. And it would extremely nice if the change between the last commit selected and the current one could be highlighted in some way.
-

Johannes Gilger September 12th, 2010 @ 12:12 PM
- State changed from open to small
- Milestone order changed from 0 to 0
This will be obsolete if we adopt Nathan's branch for 0.8. The treeview remembers the selection.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
GitX is the nice-looking gitk clone for OS X
People watching this ticket
Referenced by
-
#195 Switching between commits while browsing the tree view should keep focus on selected file when possible.
I'm afraid this ticket is a duplicate of #137. I had
alre...