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
Bug: Icon-view reset its selection on reload #81
Comments
This seems to be a result of the node reloading policy which replace the all objects in the node's subtree with new instances, as explained here:
Can any one please give some additional details? Why is it important to create a new objects rather than modifying the subnodes/objects that need to be updated? |
iMedia 2 creates and populates nodes/objects on a background thread so as to avoid blocking the main thread during any long-running operations. If the existing nodes/objects were to be re-used, there would be both the main thread and background accessing them at the same time, necessitating some sort of locking mechanism. Creating fresh nodes/objects each time avoids that threading issue. |
I see. Thanks for the explanation. |
It certainly sounds possible. I didn’t design iMedia’s architecture though, so there may well be good reasons why it’s not doing this that I haven’t thought of. |
After the file watcher sends a notification about change in a path of the currently selected node, the node is being reloaded, and so the icon-view which lose its selection and reset its scrollers.
Many times (at least on my 10.8) it seems that nothing was really changed, so for the user it looks that the selection was just reset without any reason.
I think that when data is reload the icon view selection and its scroller location must be preserved (if the selected object(s) still exist).
To reproduce:
The text was updated successfully, but these errors were encountered: