qgis-planet-plugin
qgis-planet-plugin copied to clipboard
Update on the AOI text input
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
Screenshot of the behaviour using this PR changes
@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.
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.
@Samweli Glad you found a fix for this issue
@vermeulendivan, I have pushed changes to fix the issues, thanks.
@vermeulendivan I'm still looking at the best option to include the clear button for the QTextEdit, thanks.
@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).