olivierdalang / VectorBender

VectorBender is a QGis plugin
GNU General Public License v3.0
37 stars 15 forks source link

Porting to Qgis 3 #16

Closed jorgealmerio closed 5 years ago

jorgealmerio commented 5 years ago

Hi, Olivier

Sorry for the delay.

Here are the files changed for porting the plugin to the new python 3.xx format (Qgis 3)

I realized that "vectorbendertransformers.py" from here (master) is outdated comparing to the Qgis repository version, that's why there were so many code differences between my updated version and the master.

Thank you!

olivierdalang commented 5 years ago

Hi Jorge,

Thanks for the PR. There seem to be some line ending issues on some files (for example vectorbenderdialog.py), which makes it look like the whole file was changed, and which in turn makes it very hard to review the changes.

Can you try to fix this ? Not sure on how you pushed your code to github... if using the normal git workflow (git checkout, make your changes, git push), the default git config should deal with that correctly out of the box. If using some other workflow (one of your commits mentions an upload to github) you may need to manually change the line endings before uploading.

jorgealmerio commented 5 years ago

Hi Olivier,

I did all the uploads directly from github website. As I told you, I am not github expert. I do not know exactly how to solve this line ending issues, but I saw a way to you see the real changes to the "vectorbenderdialog.py" by clicking on my second commint (I do not know why there is 3, I upload it just once), please see pictures: vectorbenderdialog

image

jorgealmerio commented 5 years ago
  1. Exception when running a transform (any type) Line 269: newGeom = QgsGeometry.fromPolyline( [geom[-1],geom[-1]] ) replaced by: newGeom = QgsGeometry.fromPolylineXY( [geom[-1],geom[-1]] )

  2. Dialog doesn't properly refresh On vectorbenderdialog.py Line 267: if event.type() == QEvent.FocusIn: replaced by: if event.type() == QEvent.WindowActivate:

  3. Deprecation warning (on plugin loading) Line 152 from "objcreator.py" from Qgis is using a deprecated option it should be changed to: plugin = open(filename, 'r')

It happens with some plugins (I am not so sure, by it depends on the way it calls the UI files), so it's not a Vectorbender warning.

olivierdalang commented 5 years ago

Thanks @jorgealmerio , quickly tested today and it looks fine ! I'll push the new version to the repo ASAP