Bug 364725 - renaming a file collapse the navigator tree
Summary: renaming a file collapse the navigator tree
Status: RESOLVED FIXED
Alias: None
Product: Orion (Archived)
Classification: ECD
Component: Client (show other bugs)
Version: 0.3   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 0.5 M2   Edit
Assignee: Susan McCourt CLA
QA Contact:
URL:
Whiteboard:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2011-11-24 10:47 EST by Felipe Heidrich CLA
Modified: 2012-04-23 17:34 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Felipe Heidrich CLA 2011-11-24 10:47:03 EST
as the  title says it

it is pretty annoying when you need to rename several files.
Comment 1 Susan McCourt CLA 2011-11-24 11:18:36 EST
right now we just refresh the tree, but we could use the same expansion storing we do for reload.
Comment 2 Susan McCourt CLA 2012-04-23 17:34:31 EDT
fixed.  I had forgotten how bad this was. If you had something like:
Folder1
  Folder2
    Folder3
      Folder4

Then renaming any of these folders would collapse all the way up to Folder1.  

The original problem was that the tree refreshed the entire root.  It was a lazy work around for the fact that expansions are cached by name, so the remembered expansions don't work, and you can't look up a renamed item in the treetable (since the row id's are based on the item name).  So the fix is to refresh using the item's parent so that the child items (including the renamed items) will be updated and thus findable in the tree.  We also remember the expand state of the renamed item if it is a folder, so that we can expand it once we've refreshed its parent and siblings.

So...now you can rename Folder4, Folder3 and the state will remain.  Note that we don't recurse/remember the expansion state any deeper than one level.  So if you rename Folder 2 you end up with
Folder1
  Folder2
    Folder3

Much improved...possibly some context if there were lots of children expanded could be lost, but never again do you lose the item that you actually renamed.