Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subfolders are swapped while scanning #24

Closed
phiresky opened this issue Aug 19, 2016 · 3 comments
Closed

Subfolders are swapped while scanning #24

phiresky opened this issue Aug 19, 2016 · 3 comments
Labels

Comments

@phiresky
Copy link
Contributor

To reproduce:

  1. Scan a large folder
  2. While scanning, click the arrow icon to show the subtree of a folder
  3. The shown subtree sometimes actually belongs to a different directory

Example: Here the contents of /etc are shown as the contents of /usr
2016-08-19-19-06-48

@Smile4ever
Copy link
Contributor

This issue might be related: when scanning, selecting a subfolder and using your arrows, the status bar text doesn't always reflect the item selected.

@shundhammer
Copy link
Owner

Yes, something is badly out of sync here. I noticed you don't even need to change the sorting; just opening or closing branches may already trigger this behaviour.

@shundhammer
Copy link
Owner

Looks like QAbstractItemModel is too simplistic to realistically do this right: It is not made for data that are constantly changing and thus the sort order has to constantly change, too. So QDirStat's DirTreeModel would basically have to tell it all the time to rebuild itself completely whenever the sort order might have changed - i.e. whenever there is a new read job or a read job has finished.

That in turn would not only mean much more flicker, but also context information would constantly get lost - information such as the current scrollbar positions and what branches are expanded or collapsed. That would be a usability nightmare.

So it turned out to be necessary to give up the concept of sorting by read jobs during reading. Now sorting by directory names instead.

Interestingly enough, the user can still sort by any other column; but the sorting is only effective for the moment the user clicks on that header. As the numbers change, the sorting might get out of order. This is a known limitation and any complaints about that will be declared invalid and any such bugs closed as invalid. The alternative would be to disable user sorting completely while directories are read.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants