Repository navigation
Conversation
The connection was made in `showEvent`, which fires on each `show()` and `open()`, so the folder picker opened twice per click. Fixes opengisch#753
Cancelling the picker no longer clears the line edit. The picker also gets a parent window and a "Select directory" caption.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #753
On the first synchronization of a cloud project, clicking "..." on the local directory page opened the folder picker, and cancelling it immediately opened a second one.
Changes
clickedconnection was made inshow_project_local_dir_selection(), which runs on everyshowEvent. The dialog is shown twice, byshow()inshow_transfer_dialog()and then byopen()inshow_sync_popup(), so the button ended up connected twice. The connection now lives in the constructor.select_folder()no longer overwrites the line edit with an empty string when the picker is cancelled. The picker also gets a parent window and a "Select directory" caption instead of Qt's generic "Find Directory". This also applies to the QField directory picker in the synchronize dialog.How to test
Out of scope
The issue also mentions that typing a directory name does not offer to create it. That comes from Qt's native
QFileDialog, which only accepts existing directories. The typed directory is already created withos.makedirswhen the synchronization starts.