olivierdalang / CadInput

CadInput QGIS plugin
10 stars 1 forks source link

use a UI file #12

Closed 3nids closed 10 years ago

3nids commented 10 years ago

Hi Olivier,

this pull request aims at reducing a bit of the code by using a UI file for the dock. the diff is not really easy to read, I believe PyCharm replaced tabs by spaces. Is this ok for you?

I removed your custom QLineEdit class and used an event filter, see beginning of CadInputWidget.py. This is working pretty well.

I also added icons, see: image

Let me know what you think! Cheers, Denis

olivierdalang commented 10 years ago

Hi !

When testing your branch, I get a hard crash upon quitting QGIS. Just before crashing, this python error :

File "CadInputWidget.py", line 41, in eventFilter
    if event.type() != QEvent.KeyPress:
AttributeError: 'NoneType' object has no attribute 'KeyPress'

Don't you get this error ? I guess something is missing in unload() ?

3nids commented 10 years ago

I cannot reproduce this error here. I believe it's an OS dependent bug. Does the second commit help?

3nids commented 10 years ago

btw, I always got a crash when closing QGIS (not related to this branch). Apparently, the crash occurs on QgsMapCanvas::unsetMapTool