Menu

#1514 Management list tree should retain its position after deleting or renaming files

Undefined
fixed
listview (1)
Feature_Request
2025-02-23
2025-02-04
Elena
No

This feature request is relative to the list tree in the Management box, where all project files are sorted and listed.
Every time you rename or delete a file, the current vertical list position is resetted to top, and one has to scroll to locate the original position again. This is quite frustrating, in particular when there are several tens files inside a folder !
Now, I don't know whether this is a flaw with the GUI toolkit used or rather C::B has some control on it, but I kindly ask you to fix it nonetheless. Also, I am not sure whether to deem this a "bug" or just a flaw deserving a Feature Request (I opted for the latter). Thanks in advance.

Discussion

  • ollydbg

    ollydbg - 2025-02-05

    Every time you rename or delete a file, the current vertical list position is resetted to top, and one has to scroll to locate the original position again.

    I can confirm this bug, indeed, it is annoying.

     
    👍
    1
  • Miguel Gimenez

    Miguel Gimenez - 2025-02-06

    The problem is that the tree is rebuilt from scratch, so any saved wxTreeItemId would be invalid.
    Saving the path to the top-most item before calling DeleteAllItems() and looking for it afterwards may be a solution.

    See ProjectManagerUI::RebuildTree() in projectmanagerui.cpp for more information.

     
  • Miguel Gimenez

    Miguel Gimenez - 2025-02-06

    The attached patch should fix the issue, please check if it is OK for you.

     
  • Elena

    Elena - 2025-02-06

    Thanks Miguel for taking care of this. Unfortunately at present I am unable to compile C::B. I'll wait for a binary patch or fix, when available

     
  • Miguel Gimenez

    Miguel Gimenez - 2025-02-06
    • assigned_to: Miguel Gimenez
     
  • Miguel Gimenez

    Miguel Gimenez - 2025-02-09
    • status: open --> fixed
     
  • Miguel Gimenez

    Miguel Gimenez - 2025-02-09

    Fixed in [r13611].

     

    Related

    Commit: [r13611]

  • Elena

    Elena - 2025-02-23

    Ok finally the NB is out so I could try it. It is almost ok, I mean, if I rename the last file in the tree, the list position is still resetted to top. To test: have a long list of files not fitting the screen, scroll it all the ways down, rename the last file: the display will still be scrolled to top... hope this helps

     

Log in to post a comment.

MongoDB Logo MongoDB