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

Update on the AOI text input #123

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Update on the AOI text input #123

wants to merge 2 commits into from

Conversation

Samweli
Copy link
Collaborator

@Samweli Samweli commented Feb 9, 2023

These changes update the AOI input to use QTextEdit instead of the current used QLineEdit for the geojson text inputs.

The QLineEdit has a limit of 32767 character making it unqualified to handle long geojson strings.

The QTextEdit doesn't have the textEdited signal which is available in QLineEdit, it is used to differentiate the source of the text input change, now that we will be using the QTextEdit we will be blocking the related signals manually when we are setting the text from the code since QTextEdit doesn't contain a designated function for such case.

Screenshot of the issue
bug_in_geojson_input

Screenshot of the behaviour using this PR changes
fixed_geojson_input

@vermeulendivan
Copy link
Collaborator

vermeulendivan commented Feb 9, 2023

@Samweli Glad you found a fix for this issue. Did quick testing on my side, found the following.
The text on the coordinates box is cut off, and there use to be a button you can click to clear the text box - this might have been part of the qlineedit.
image

If you click "Search" the following error occurs. The coordinates format in the text box seems to differ as it use to be, not sure if that is the cause atm.
image

@Samweli
Copy link
Collaborator Author

Samweli commented Feb 9, 2023

@Samweli Glad you found a fix for this issue

@vermeulendivan, I have pushed changes to fix the issues, thanks.

@Samweli
Copy link
Collaborator Author

Samweli commented Feb 9, 2023

@vermeulendivan I'm still looking at the best option to include the clear button for the QTextEdit, thanks.

@john-dupuy
Copy link
Contributor

john-dupuy commented Feb 9, 2023

@Samweli checking locally and it looks like the button to remove all the text has been removed (as @vermeulendivan mentioned)? EDIT: just saw your note about this.

Also I noted the following:

  • If you click away from QGIS and then click back on QGIS, highlight all the text in the GeoJSON and hit "Backspace", the text won't be removed (cursor just resets to the first line). You have to re-highlight and remove the text again.
  • Now the text is on multiple lines, which I think is good, but it'd be nice if there was a way to resize the text box so it's a little more parse-able (can be a future MR).

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

Successfully merging this pull request may close these issues.

3 participants