FileDialog: Add URLs only if they're not present
As #7405 states, all user-saved bookmarks/URLs on the sidebar is lost when LMMS launches the FileDialog, which affects other QT apps that share the same file dialog in the system.
This does:
- Keep the original code, but load all the preexisting URLs and only insert to the sidebar the URLs that aren't there. Some users might have their own configuration and want it to stay that way, therefore we should keep all the original URLs. ~~2. Store a list of the old URLs and restore them when the destructor of FileDialog is called.~~ Removed, see reason
I initially wanted to have FileDialog(...) open the sidebar as is, but that would mean removing the implementation the previous contributor intended.
I realized that the user may also want to add bookmarks inside LMMS. This PR would've made it impossible to do that because the the sidebar will always revert to the old state when it exists. The steps needed to scan for new bookmarks are too complicated and unnecessary for now, so I'm going to remove the 2nd task of this PR.
I realized that the user may also want to add bookmarks inside LMMS. This PR would've made it impossible to do that because the the sidebar will always revert to the old state when it exists. The steps needed to scan for new bookmarks are too complicated and unnecessary for now, so I'm going to remove the 2nd task of this PR.
Would switching to using just the QFileDIalog work? I believe it handles all of this for us and more automatically.
@sakertooth It could be possible. However LMMS's FileDialog currently has some custom methods. I can try to migrate to QFileDialog but this is a bit out of the scope of this PR at the moment
Closing this in favor of #7575