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
File Dialog favourites look broken if you use fd.SetLocation for a specific favourite location #2595
Comments
Can anyone replicate this? It's working as expected on my macOS computer? Maybe linux specific somehow... |
Test on a seperate linux machine. The issue is still there. |
Hi @andydotxyz To test this theory I run a couple of tests:
func (f *fileDialog) getPlaces() []favoriteItem {
var places []favoriteItem
for _, drive := range listDrives() {
driveRoot := drive + string(os.PathSeparator) // capture loop var
driveRootURI, _ := storage.ListerForURI(storage.NewURI("file://" + driveRoot))
places = append(places, favoriteItem{
drive,
theme.StorageIcon(),
driveRootURI,
})
}
places = append(places, favoriteItem{
"Dummy item",
theme.StorageIcon(),
nil,
})
return places
} After this change I got the same bevahiour as the one in linux. 8 seems to be the magic number here. |
Another note is to say that it does not happen for all |
Resolved on |
Describe the bug:
I have the following code. When I select a file, I also store the last file location so I can then use fd.SetLocation next time to open the same location. If that file location is the "Video" favourite folder (which is the last in the list to the left), when I reopen the dialog, some options are missing from that list. It looks like a graphics glich as the locations will re-appear if I click somewhere.
Video:
(please ignore the video flickering)
https://user-images.githubusercontent.com/11015965/139349869-322903d8-bdb7-4e7b-9c20-e38e666178ac.mp4
Example code:
Device (please complete the following information):
The text was updated successfully, but these errors were encountered: